rxrpc: Fix locking in rxrpc's sendmsg
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-667 and the CVSS impact.
Summary
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]
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 4.15 and later | 5.10.140, 5.15.64, 5.19.6, 6.0 | Patch available | CNA |
- Linux VendorLinux Affected 4.15 and later Fixed in 5.10.140, 5.15.64, 5.19.6, 6.0 Patch available CNA
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 to before 5.10.140; 5.11 to before 5.15.64; 5.16 to before 5.19.6 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.0:rc1:*:*:*:*:*:* | 6.0 rc1 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.0:rc2:*:*:*:*:*:* | 6.0 rc2 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 4.15 to before 5.10.140; 5.11 to before 5.15.64; 5.16 to before 5.19.6 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.0:rc1:*:*:*:*:*:* Versions 6.0 rc1 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.0:rc2:*:*:*:*:*:* Versions 6.0 rc2 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 5.10.140, 5.15.64, 5.19.6, 6.0
Red Hat 1 advisory
- RHSA-2023:2458 Released 2023-05-09 · Red Hat rating Importantkernel security, bug fix, and enhancement update
- Red Hat Enterprise Linux AppStream (v. 9) kernel-64k-debug-devel-5.14.0-284.11.1.el9_2, kernel-64k-debug-devel-matched-5.14.0-284.11.1.el9_2, kernel-64k-devel-5.14.0-284.11.1.el9_2 +10
- Red Hat Enterprise Linux BaseOS (v. 9) bpftool-7.0.0-284.11.1.el9_2, kernel-5.14.0-284.11.1.el9_2, kernel-64k-5.14.0-284.11.1.el9_2 +29
- Red Hat Enterprise Linux CRB (v. 9) kernel-tools-libs-devel-5.14.0-284.11.1.el9_2
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2023:2458 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2023:2458 |
| Red Hat Enterprise Linux CRB (v. 9) | Fixed | RHSA-2023:2458 |
Not affected: 5 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2022-49998
- 2026-10-03 Alias added: GHSA-qc5g-94x3-gf9g
References
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2022-49998 · CVE Program
- CVE-2022-49998 · NVD
- FIRST EPSS
- GHSA-qc5g-94x3-gf9g · GitHub Advisory Database · CC BY 4.0
- CVE-2022-49998 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences