Re: [Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Martin Natano
On Mon, Jul 11, 2016 at 04:39:05PM -0400, Ted Unangst wrote: > Tim Newsham wrote: > > The tmpfs filesystem allows the mounting user to specify a > > username, a groupname or a device name for the root node of > > the filesystem. A user that specifies a value of VNOVAL for > > any of these fields

Re: [Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Martin Natano
On Mon, Jul 11, 2016 at 05:06:33PM -0400, Ted Unangst wrote: > Todd C. Miller wrote: > > On Mon, 11 Jul 2016 16:39:05 -0400, "Ted Unangst" wrote: > > > > > sigh. i don't know what else can trigger that kassert, so just fix the > > > caller > > > to do the same check and return an error. > > > >

Re: [Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Todd C. Miller
On Mon, 11 Jul 2016 17:06:33 -0400, "Ted Unangst" wrote: > those checks are equally useless. UID_MAX is UINT_MAX so the tests don't fire > . > > the question is what other tmpfs code blows up when nodes owned by -1 start > showing up. Fair enough. But this bit can never be true:

Re: [Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Ted Unangst
Todd C. Miller wrote: > On Mon, 11 Jul 2016 16:39:05 -0400, "Ted Unangst" wrote: > > > sigh. i don't know what else can trigger that kassert, so just fix the > > caller > > to do the same check and return an error. > > Checking for VNOVAL is kind of bogus. How about we try something > more

Re: [Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Todd C. Miller
On Mon, 11 Jul 2016 16:39:05 -0400, "Ted Unangst" wrote: > sigh. i don't know what else can trigger that kassert, so just fix the caller > to do the same check and return an error. Checking for VNOVAL is kind of bogus. How about we try something more sensible? - todd Index: tmpfs_subr.c

Re: [Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Ted Unangst
Tim Newsham wrote: > The tmpfs filesystem allows the mounting user to specify a > username, a groupname or a device name for the root node of > the filesystem. A user that specifies a value of VNOVAL for > any of these fields will trigger an assert in tmpfs_alloc_node(): > > /* XXX pedro: we

[Bug49] Tmpfs mount with bad args can lead to a panic

2016-07-11 Thread Tim Newsham
Here's a bug related to tmpfs mounts. Forwarded Message Subject:[Bug49] Tmpfs mount with bad args can lead to a panic Date: Mon, 11 Jul 2016 10:07:33 -1000 From: Tim Newsham <tim.newsham@nccgroup.trust> To: dera...@openbsd.org, Jesse Hertz <Je