mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
devfs: Return early from sysctl_devname() if no input is given
Otherwise we end up searching for a device using an uninitialized key, tripping up KMSAN. MFC after: 2 weeks (cherry picked from commit 48d6b52add36cc09e7fb1fbec44ab66c0742f320)
This commit is contained in:
parent
8c991c4b06
commit
48fddba637
1 changed files with 3 additions and 0 deletions
|
|
@ -86,6 +86,9 @@ sysctl_devname(SYSCTL_HANDLER_ARGS)
|
|||
struct cdev_priv *cdp;
|
||||
struct cdev *dev;
|
||||
|
||||
if (req->newptr == NULL)
|
||||
return (EINVAL);
|
||||
|
||||
#ifdef COMPAT_FREEBSD11
|
||||
if (req->newlen == sizeof(ud_compat)) {
|
||||
error = SYSCTL_IN(req, &ud_compat, sizeof(ud_compat));
|
||||
|
|
|
|||
Loading…
Reference in a new issue