Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Aug 2020 06:27:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 248444] /usr/sbin/jail crashes when parsing certain configuration files
Message-ID:  <bug-248444-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

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@FreeBSD.org
          Reporter: ms-freebsd-bugzilla@stoffnet.at
                CC: ms-freebsd-bugzilla@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.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248444-227>