OPNSense/src 06a14adsys/kern vfs_mount.c

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
DeltaFile
+2-2sys/kern/vfs_mount.c
+2-21 files

UnifiedSplitRaw