CVE-2022-49450
JSON

5.5medium

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

Severity
5.5medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.29% (higher than 14% of CVEs)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: rxrpc: Fix listen() setting the bar too high for the prealloc rings AF_RXRPC'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 CIRC_CNT(). This means that listen(rxrpc_sock, 32) will cause an oops when the socket is closed because rxrpc_service_prealloc_one() allocated one too many calls and rxrpc_discard_prealloc() won't then be able to get rid of them because it'll think the ring is empty. rxrpc_release_calls_on_socket() then tries to abort them, but oopses because call->peer isn't yet set. Fix this by setting the maximum backlog to RXRPC_BACKLOG_MAX - 1 to match the ring capacity. BUG: kernel NULL pointer dereference, address: 0000000000000086 ... RIP: 0010:rxrpc_send_abort_packet+0x73/0x240 [rxrpc] Call Trace: <TASK> ? __wake_up_common_lock+0x7a/0x90 ? rxrpc_notify_socket+0x8e/0x140 [rxrpc] ? rxrpc_abort_call+0x4c/0x60 [rxrpc] rxrpc_release_calls_on_socket+0x107/0x1a0 [rxrpc] rxrpc_release+0xc9/0x1c0 [rxrpc] __sock_release+0x37/0xa0 sock_close+0x11/0x20 __fput+0x89/0x240 task_work_run+0x59/0x90 do_exit+0x319/0xaa0

Affected

Product or packageVersionsReported by
Linux Linuxfrom 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before 61fb38cfbb1d54d3dafd0c25752f684b3cd00b32, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before 616f76498d5ddf26b997caf64a95cda3c8a55533, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before 4a3a78b7918bdd723d8c7c9786522ca969bffcc4, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before 91b34bf0409f43bb60453bab23c5beadd726d022, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before 5b4826657d36c218e9f08e8d3223b0edce3de88f, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before b3a9b227d5e7467b8518160ff034ea22bb9de573, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before 369de57492c4f1a42563c5a3bd365822ca3bfc79, from 00e907127e6f86d0f9b122d9b4347a8aa09a8b61 before e198f1930050e3115c80b67d9249f80f98a27c67 and 2 more
Not affected: before 4.9, from 4.9.318 up to 4.9.*, from 4.14.283 up to 4.14.*, from 4.19.247 up to 4.19.*, from 5.4.198 up to 5.4.*, from 5.10.121 up to 5.10.*
CVE List
linux linux_kernelfrom 4.9 before 4.9.318, from 4.10 before 4.14.283, from 4.15 before 4.19.247, from 4.20 before 5.4.198, from 5.5 before 5.10.121, from 5.11 before 5.15.46, from 5.16 before 5.17.14, from 5.18 before 5.18.3NVD

All scores

CISA-ADP5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-476

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: rxrpc: Fix listen() setting the bar too high for the prealloc rings AF_RXRPC'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 CIRC_CNT(). This means that listen(rxrpc_sock, 32) will cause an oops when the socket is closed because rxrpc_service_prealloc_one() allocated one too many calls and rxrpc_discard_prealloc() won't then be able to get rid of them because it'll think the ring is empty. rxrpc_release_calls_on_socket() then tries to abort them, but oopses because call->peer isn't yet set. Fix this by setting the maximum backlog to RXRPC_BACKLOG_MAX - 1 to match the ring capacity. BUG: kernel NULL pointer dereference, address: 0000000000000086 ... RIP: 0010:rxrpc_send_abort_packet+0x73/0x240 [rxrpc] Call Trace: <TASK> ? __wake_up_common_lock+0x7a/0x90 ? rxrpc_notify_socket+0x8e/0x140 [rxrpc] ? rxrpc_abort_call+0x4c/0x60 [rxrpc] rxrpc_release_calls_on_socket+0x107/0x1a0 [rxrpc] rxrpc_release+0xc9/0x1c0 [rxrpc] __sock_release+0x37/0xa0 sock_close+0x11/0x20 __fput+0x89/0x240 task_work_run+0x59/0x90 do_exit+0x319/0xaa0

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: rxrpc: Se corrige que listen() estableciera la barra demasiado alta para los anillos de preasignación El controlador listen() de AF_RXRPC le permite establecer el backlog hasta 32 (si aumenta el sysctl), pero mientras que los búferes circulares de preasignación tienen 32 ranuras en ellos, una de ellas tiene que ser una ranura muerta porque estamos usando CIRC_CNT(). Esto significa que listen(rxrpc_sock, 32) causará un oops cuando el socket se cierre porque rxrpc_service_prealloc_one() asignó una llamada de más y rxrpc_discard_prealloc() no podrá deshacerse de ellas porque pensará que el anillo está vacío. rxrpc_release_calls_on_socket() luego intenta abortarlas, pero falla porque call-&gt;peer aún no está configurado. Solucione esto configurando el backlog máximo en RXRPC_BACKLOG_MAX - 1 para que coincida con la capacidad del anillo. ERROR: desreferencia de puntero NULL del kernel, dirección: 0000000000000086 ... RIP: 0010:rxrpc_send_abort_packet+0x73/0x240 [rxrpc] Call Trace: ? __wake_up_common_lock+0x7a/0x90 ? rxrpc_notify_socket+0x8e/0x140 [rxrpc] ? rxrpc_abort_call+0x4c/0x60 [rxrpc] rxrpc_release_calls_on_socket+0x107/0x1a0 [rxrpc] rxrpc_release+0xc9/0x1c0 [rxrpc] __sock_release+0x37/0xa0 sock_close+0x11/0x20 __fput+0x89/0x240 task_work_run+0x59/0x90 do_exit+0x319/0xaa0

References

Sources

SourceRecordLicence
CVE ListCVE-2022-49450 changed 2026-05-11CVE Terms of Use
NVDCVE-2022-49450 changed 2026-06-17Public domain