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


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 24 Sep 2026
- **Updated:** 21 Oct 2026
- **Also known as:** AZL-103934, BELL-CVE-2026-93231, DEBIAN-CVE-2026-93231, GHSA-hmpj-ph58-cxj3, UBUNTU-CVE-2026-93231

## What is CVE-2026-93231?

CVE-2026-93231 is a vulnerability in Linux, published on 24 Sep 2026. 

### Official description

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

lockd: fix swapped arguments in nlmsvc_match_ip()

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

	nlm_traverse_files(server_addr, nlmsvc_match_ip, NULL);

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

	match(lockhost, host);

where the first argument is the nlm_host 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 (nlmsvc_mark_host(), nlmsvc_same_host(), nlmsvc_is_client()):
arg1 is the real nlm_host, arg2 is the caller-supplied reference value.

nlmsvc_match_ip() 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 rpc_cmp_addr(nlm_srcaddr(host), datap);

Here @host is actually the server sockaddr, so nlm_srcaddr(host)
dereferences a struct sockaddr as a struct nlm_host and reads garbage
at the offset of h_srcaddr; meanwhile @datap is actually the lock
owner's nlm_host 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 rpc_cmp_addr(nlm_srcaddr(datap), (struct sockaddr *)host);

[ cel: fix the misleading typedef parameter names too ]

## Which versions are affected by CVE-2026-93231?


## How do I fix CVE-2026-93231?

Upgrade to a fixed version.

## Is CVE-2026-93231 being exploited?

There is no known exploitation of CVE-2026-93231 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-93231 and fix it if it is affected.

What it is: CVE-2026-93231 is a vulnerability in Linux, published on 24 Sep 2026. 
Exploitation: There is no known exploitation of CVE-2026-93231 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-93231/ (Markdown: https://insights.sbomify.com/CVE-2026-93231/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-93231
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-93231
- OSV: https://osv.dev/vulnerability/CVE-2026-93231

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-93231/
Summaries are generated and may contain mistakes; the official description above is the record.
