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/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248444

            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 c=
ould
only reproduce this issue with "$interface".

Example:

Setting "$interface" in two jail configurations ("crash" and "nocrash"). Us=
ing
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 =3D "echo '\$interface =3D ${interface}'";

    crash {
            $interface =3D "vr0";
    }

    nocrash {
            $interface =3D "vr1";
    }

How to reproduce:

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

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

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



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