# CVE-2022-49998: rxrpc: Fix locking in rxrpc's sendmsg

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2025-06-18T11:00:57.940Z
- **Modified:** 2026-08-05T08:57:06.559Z

## Who should check

- Anyone running Linux \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 79e2ca7aa96e80961828ab6312264633b66183cc; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 2bc769b8edb158be7379d15f36e23d66cf850053; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 091dc91e119fdd61432347231724f4e861c6b465; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< b0f571ecd7943423c25947439045f0d352ca3dbf
- Anyone running Linux 4.15

## Description

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

rxrpc: Fix locking in rxrpc's sendmsg

Fix three bugs in the rxrpc's sendmsg implementation:

 (1) rxrpc\_new\_client\_call() should release the socket lock when returning
     an error from rxrpc\_get\_call\_slot().

 (2) rxrpc\_wait\_for\_tx\_window\_intr() will return without the call mutex
     held in the event that we're interrupted by a signal whilst waiting
     for tx space on the socket or relocking the call mutex afterwards.

     Fix this by: (a) moving the unlock/lock of the call mutex up to
     rxrpc\_send\_data() such that the lock is not held around all of
     rxrpc\_wait\_for\_tx\_window\*() and (b) indicating to higher callers
     whether we're return with the lock dropped.  Note that this means
     recvmsg() will not block on this call whilst we're waiting.

 (3) After dropping and regaining the call mutex, rxrpc\_send\_data() needs
     to go and recheck the state of the tx\_pending buffer and the
     tx\_total\_len check in case we raced with another sendmsg() on the same
     call.

Thinking on this some more, it might make sense to have different locks for
sendmsg() and recvmsg().  There's probably no need to make recvmsg() wait
for sendmsg().  It does mean that recvmsg() can return MSG\_EOR indicating
that a call is dead before a sendmsg() to that call returns - but that can
currently happen anyway.

Without fix (2), something like the following can be induced:

	WARNING: bad unlock balance detected!
	5.16.0-rc6-syzkaller \#0 Not tainted
	-------------------------------------
	syz-executor011/3597 is trying to release lock (&call-\>user\_mutex) at:
	\[\<ffffffff885163a3\>\] rxrpc\_do\_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748
	but there are no more locks to release!

	other info that might help us debug this:
	no locks held by syz-executor011/3597.
	...
	Call Trace:
	 \<TASK\>
	 \_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
	 dump\_stack\_lvl+0xcd/0x134 lib/dump\_stack.c:106
	 print\_unlock\_imbalance\_bug include/trace/events/lock.h:58 \[inline\]
	 \_\_lock\_release kernel/locking/lockdep.c:5306 \[inline\]
	 lock\_release.cold+0x49/0x4e kernel/locking/lockdep.c:5657
	 \_\_mutex\_unlock\_slowpath+0x99/0x5e0 kernel/locking/mutex.c:900
	 rxrpc\_do\_sendmsg+0xc13/0x1350 net/rxrpc/sendmsg.c:748
	 rxrpc\_sendmsg+0x420/0x630 net/rxrpc/af\_rxrpc.c:561
	 sock\_sendmsg\_nosec net/socket.c:704 \[inline\]
	 sock\_sendmsg+0xcf/0x120 net/socket.c:724
	 \_\_\_\_sys\_sendmsg+0x6e8/0x810 net/socket.c:2409
	 \_\_\_sys\_sendmsg+0xf3/0x170 net/socket.c:2463
	 \_\_sys\_sendmsg+0xe5/0x1b0 net/socket.c:2492
	 do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
	 do\_syscall\_64+0x35/0xb0 arch/x86/entry/common.c:80
	 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

\[Thanks to Hawkins Jiawei and Khalid Masum for their attempts to fix this\]

## Affected and fixed versions

- Linux: \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 79e2ca7aa96e80961828ab6312264633b66183cc; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 2bc769b8edb158be7379d15f36e23d66cf850053; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 091dc91e119fdd61432347231724f4e861c6b465; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< b0f571ecd7943423c25947439045f0d352ca3dbf (cvelist)
- Linux: 4.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-49998. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49998.md
Affected: Linux >= bc5e3a546d553e5223851fc199e69040eb70f68b, < 79e2ca7aa96e80961828ab6312264633b66183cc; >= bc5e3a546d553e5223851fc199e69040eb70f68b, < 2bc769b8edb158be7379d15f36e23d66cf850053; >= bc5e3a546d553e5223851fc199e69040eb70f68b, < 091dc91e119fdd61432347231724f4e861c6b465; >= bc5e3a546d553e5223851fc…
Fixed in: Linux 79e2ca7aa96e80961828ab6312264633b66183cc, Linux 2bc769b8edb158be7379d15f36e23d66cf850053, Linux 091dc91e119fdd61432347231724f4e861c6b465

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-49998 being exploited?

There is no confirmed exploitation: CVE-2022-49998 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-49998?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-49998?

Linux \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 79e2ca7aa96e80961828ab6312264633b66183cc; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 2bc769b8edb158be7379d15f36e23d66cf850053; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< 091dc91e119fdd61432347231724f4e861c6b465; \>= bc5e3a546d553e5223851fc199e69040eb70f68b, \< b0f571ecd7943423c25947439045f0d352ca3dbf; Linux 4.15.

### Is there a fix for CVE-2022-49998?

Yes. Fixed in Linux 79e2ca7aa96e80961828ab6312264633b66183cc, Linux 2bc769b8edb158be7379d15f36e23d66cf850053, Linux 091dc91e119fdd61432347231724f4e861c6b465. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-49998?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/79e2ca7aa96e80961828ab6312264633b66183cc>
- patch: <https://git.kernel.org/stable/c/2bc769b8edb158be7379d15f36e23d66cf850053>
- patch: <https://git.kernel.org/stable/c/091dc91e119fdd61432347231724f4e861c6b465>
- patch: <https://git.kernel.org/stable/c/b0f571ecd7943423c25947439045f0d352ca3dbf>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-49998>

HTML: <https://flawdb.com/CVE-2022-49998> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-49998>
