[Bug 196483] [patch] change vfs_setopt{,_part}(...)'s len parameter to fix possible DoS

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 18 02:13:49 UTC 2015


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

--- Comment #3 from Kirk McKusick <mckusick at FreeBSD.org> ---
Comment on attachment 151321
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151321
0001-HBSD-change-vfs_setopt-_part-.-s-len-type-to-check-b.patch

I agree with the sentiment reported here. But it is incomplete. The type of the
len field declared in struct vfsopt (declared in sys/mount.h) needs to be
changed to size_t. Also the type of field len in struct mntarg (declared in
kern/vfs_mount.c)
needs to be changed to size_t. Another function that needs to have its len
parameter changed to size_t is vfs_copyopt. In short, a pass needs to be made
over kern/vfs_mount.c to make the use of len consistent throughout. Then the
callers of the affected functions need to ensure that they are calling with
appropriate parameters.

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


More information about the freebsd-bugs mailing list