]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFS r353032:
authorAndrew Turner <andrew@FreeBSD.org>
Fri, 4 Oct 2019 14:10:56 +0000 (14:10 +0000)
committerAndrew Turner <andrew@FreeBSD.org>
Fri, 4 Oct 2019 14:10:56 +0000 (14:10 +0000)
commit8d00d6c88774482d4dc08383c58db01472946508
tree7fefa901417a352bdc58bb779dcd45e2459ccfa4
parent887780d44cf5e52432c9fa6ee6325ab0930c9019
MFS r353032:

Check the vfs option length is valid before accessing through

When a VFS option passed to nmount is present but NULL the kernel will
place an empty option in its internal list. This will have a NULL
pointer and a length of 0. When we come to read one of these the kernel
will try to load from the last address of virtual memory. This is
normally invalid so will fault resulting in a kernel panic.

Fix this by checking if the length is valid before dereferencing.

Approved by: re (kib)
Sponsored by: DARPA, AFRL
sys/kern/vfs_mount.c