[Bug 248444] /usr/sbin/jail crashes when parsing certain configuration files

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Aug 3 06:27:35 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248444

            Bug ID: 248444
           Summary: /usr/sbin/jail crashes when parsing certain
                    configuration files
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: ms-freebsd-bugzilla at stoffnet.at
                CC: ms-freebsd-bugzilla at stoffnet.at

Some variable names may cause the configuration parser to crash. So far I could
only reproduce this issue with "$interface".

Example:

Setting "$interface" in two jail configurations ("crash" and "nocrash"). Using
any jail configuration but the last one ("nocrash") will crash the
configuration parser. You could have any number of crashing jails ("crash1",
"crash2", ...), but only one jail that does not crash (the bottom most one).

jail.conf:

    persist;
    exec.prestart = "echo '\$interface = ${interface}'";

    crash {
            $interface = "vr0";
    }

    nocrash {
            $interface = "vr1";
    }

How to reproduce:

    # jail -f jail.conf -c crash
    Segmentation fault (core dumped)

    # jail -f crash.conf -c nocrash
    $interface = vr1
    nocrash: created
    # jail -f crash.conf -r nocrash
    nocrash: removed

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list