HomeFreeBSD

MFC r352796: Check the vfs option length is valid before accessing through

Description

MFC r352796: 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.

Details

Provenance
emasteAuthored on
Parents
rS353108: MFS r353106:
Branches
Unknown
Tags
Unknown