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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to