CVE-2022-49450

Source
https://cve.org/CVERecord?id=CVE-2022-49450
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49450.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49450
Downstream
Published
2025-02-26T02:13:00.379Z
Modified
2026-03-20T12:24:32.145174Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
rxrpc: Fix listen() setting the bar too high for the prealloc rings
Details

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

rxrpc: Fix listen() setting the bar too high for the prealloc rings

AFRXRPC's listen() handler lets you set the backlog up to 32 (if you bump up the sysctl), but whilst the preallocation circular buffers have 32 slots in them, one of them has to be a dead slot because we're using CIRCCNT().

This means that listen(rxrpcsock, 32) will cause an oops when the socket is closed because rxrpcservicepreallocone() allocated one too many calls and rxrpcdiscardprealloc() won't then be able to get rid of them because it'll think the ring is empty. rxrpcreleasecallsonsocket() then tries to abort them, but oopses because call->peer isn't yet set.

Fix this by setting the maximum backlog to RXRPCBACKLOGMAX - 1 to match the ring capacity.

BUG: kernel NULL pointer dereference, address: 0000000000000086 ... RIP: 0010:rxrpcsendabort_packet+0x73/0x240 [rxrpc] Call Trace: <TASK> ? __wakeupcommonlock+0x7a/0x90 ? rxrpcnotifysocket+0x8e/0x140 [rxrpc] ? rxrpcabortcall+0x4c/0x60 [rxrpc] rxrpcreleasecallsonsocket+0x107/0x1a0 [rxrpc] rxrpcrelease+0xc9/0x1c0 [rxrpc] __sockrelease+0x37/0xa0 sockclose+0x11/0x20 _fput+0x89/0x240 taskworkrun+0x59/0x90 doexit+0x319/0xaa0

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49450.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
00e907127e6f86d0f9b122d9b4347a8aa09a8b61
Fixed
61fb38cfbb1d54d3dafd0c25752f684b3cd00b32
Fixed
616f76498d5ddf26b997caf64a95cda3c8a55533
Fixed
4a3a78b7918bdd723d8c7c9786522ca969bffcc4
Fixed
91b34bf0409f43bb60453bab23c5beadd726d022
Fixed
5b4826657d36c218e9f08e8d3223b0edce3de88f
Fixed
b3a9b227d5e7467b8518160ff034ea22bb9de573
Fixed
369de57492c4f1a42563c5a3bd365822ca3bfc79
Fixed
e198f1930050e3115c80b67d9249f80f98a27c67
Fixed
88e22159750b0d55793302eeed8ee603f5c1a95c

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49450.json"