CVE-2026-93231: lockd: fix swapped arguments in nlmsvc_match_ip()

Published Sep 24, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

lockd: fix swapped arguments in nlmsvcmatchip()

When releasing locks by server IP address via /proc/fs/nfsd/unlockip, nlmsvcunlockallbyip() calls nlmtraversefiles() with the server sockaddr as the opaque @data argument:

nlmtraversefiles(serveraddr, nlmsvcmatchip, NULL);

The match callback is later invoked from nlmtraverselocks() as:

match(lockhost, host);

where the first argument is the nlmhost that owns the lock, and the second argument is the @data that was originally passed down (here the server sockaddr). This is the convention every other match callback relies on (nlmsvcmarkhost(), nlmsvcsamehost(), nlmsvcisclient()): arg1 is the real nlmhost, arg2 is the caller-supplied reference value.

nlmsvcmatchip() has had these two arguments reversed ever since the unlock-by-IP feature was introduced in commit 4373ea84c84d ("lockd: unlock lockd locks associated with a given server ip"):

return rpccmpaddr(nlmsrcaddr(host), datap);

Here @host is actually the server sockaddr, so nlmsrcaddr(host) dereferences a struct sockaddr as a struct nlmhost and reads garbage at the offset of hsrcaddr; meanwhile @datap is actually the lock owner's nlmhost but is compared as a sockaddr. As a result the comparison practically never matches and locks are not released for the requested IP.

Swap the arguments so the lock owner's source address is compared against the requested server address:

return rpccmpaddr(nlmsrcaddr(datap), (struct sockaddr )host);

[ cel: fix the misleading typedef parameter names too ]

Affected Software

1 affected component
Linux Linux kernel

Event History

Sep 24, 2026
CVE Published
via MITRE·03:29 PM
Data Sourced
via MITRE·03:29 PM
Description
Data Sourced
via NVD·04:17 PM
Description

Frequently Asked Questions

1

When is the affected code path reached?

It is reached when locks are released by server IP address through /proc/fs/nfsd/unlock_ip. That operation calls nlmsvc_unlock_all_by_ip() and traverses lock state using the supplied server socket address.

2

What causes the unsafe access?

The callback receives an nlm_host as its first argument and the caller-supplied server socket address as its second argument, but nlmsvc_match_ip() treats them in reverse. As a result, it passes the server socket address to nlm_srcaddr() as though it were an nlm_host, causing it to read garbage at the h_srcaddr offset.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203