Instituto Nacional de ciberseguridad. Sección Incibe
Instituto Nacional de Ciberseguridad. Sección INCIBE-CERT

Vulnerabilidad en Kernel de Linux (CVE-2021-47078)

Gravedad CVSS v3.1:
MEDIA
Tipo:
CWE-416 Utilización después de liberación
Fecha de publicación:
01/03/2024
Última modificación:
19/03/2025

Descripción

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: RDMA/rxe: borra todos los campos QP si la creación falla. rxe_qp_do_cleanup() se basa en valores de puntero válidos en QP para los creados correctamente, pero en caso de que rxe_qp_from_init() fallara, se llenó con basura y provocó el siguiente error. refcount_t: desbordamiento insuficiente; Use After Free. ADVERTENCIA: CPU: 1 PID: 12560 en lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28 Módulos vinculados en: CPU: 1 PID: 12560 Comm: syz-executor.4 No contaminado 5.12.0 -syzkaller #0 Nombre del hardware: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28 Código: e9 db fe ff ff 48 89 df e8 2c c2 ea fd e9 8a fe ff ff e8 72 6a a7 fd 48 c7 c7 e0 b2 c1 89 c6 05 dc 3a e6 09 01 e8 ee 74 fb 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55 RSP: 0018:ffffc900097ceba8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 00000000000000000 RCX: 0000000000000000 RDX: 00 00000000040000 RSI: ffffffff815bb075 RDI: fffff520012f9d67 RBP: 0000000000000003 R08: 00000000000000000 R09: 00000000000000000 R10: ffffffff815b4eae R 11: 0000000000000000 R12: ffff8880322a4800 R13: ffff8880322a4940 R14: ffff888033044e00 R15: 0000000000000000 FS: 00007f6eb2be3700(0000) GS:ffff8880b9d00000(0000) knlGS :0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdbe5d41000 CR3: 000000001d181000 CR4: 00000000001506e0 DR0: 0000 000000000000 DR1 : 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Seguimiento de llamadas: __refcount_sub_and_test include/linux/refcount.h:283 [ en línea] __refcount_dec_and_test include/linux/refcount.h:315 [en línea] refcount_dec_and_test include/linux/refcount. h:333 [en línea] kref_put include/linux/kref.h:64 [en línea] rxe_qp_do_cleanup+0x96f/0xaf0 drivers/infiniband/sw/rxe/rxe_qp.c:805 ejecutar_in_process_context+0x37/0x150 kernel/workqueue.c:3327 rxe_elem_release +0x9f/0x180 controladores/infiniband/sw/rxe/rxe_pool.c:391 kref_put include/linux/kref.h:65 [en línea] rxe_create_qp+0x2cd/0x310 controladores/infiniband/sw/rxe/rxe_verbs.c:425 controladores _ib_create_qp /infiniband/core/core_priv.h:331 [en línea] ib_create_named_qp+0x2ad/0x1370 controladores/infiniband/core/verbs.c:1231 ib_create_qp include/rdma/ib_verbs.h:3644 [en línea] create_mad_qp+0x177/0x2d0 controladores/infiniband /core/mad.c:2920 ib_mad_port_open drivers/infiniband/core/mad.c:3001 [en línea] ib_mad_init_device+0xd6f/0x1400 drivers/infiniband/core/mad.c:3092 add_client_context+0x405/0x5e0 drivers/infiniband/core/ device.c:717 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331 ib_register_device drivers/infiniband/core/device.c:1413 [en línea] ib_register_device+0x7c7/0xa50 drivers/infiniband/core/device.c :1365 rxe_register_device+0x3d5/0x4a0 controladores/infiniband/sw/rxe/rxe_verbs.c:1147 rxe_add+0x12fe/0x16d0 controladores/infiniband/sw/rxe/rxe.c:247 rxe_net_add+0x8c/0xe0 controladores/infiniband/sw/r xe /rxe_net.c:503 controladores rxe_newlink/infiniband/sw/rxe/rxe.c:269 [en línea] controladores rxe_newlink+0xb7/0xe0/infiniband/sw/rxe/rxe.c:250 controladores nldev_newlink+0x30e/0x550/infiniband/ core/nldev.c:1555 rdma_nl_rcv_msg+0x36d/0x690 controladores/infiniband/core/netlink.c:195 rdma_nl_rcv_skb controladores/infiniband/core/netlink.c:239 [en línea] rdma_nl_rcv+0x2ee/0x430 controladores/infiniband/core/netlink .c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [en línea] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket. c:654 [en línea] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b 0 red/toma .c:2433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 Entry_SYSCALL_64_after_hwframe+0 ---truncado---

Productos y versiones vulnerables

CPE Desde Hasta
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.8 (incluyendo) 4.9.270 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.10 (incluyendo) 4.14.234 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.15 (incluyendo) 4.19.192 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (incluyendo) 5.4.122 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (incluyendo) 5.10.40 (excluyendo)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (incluyendo) 5.12.7 (excluyendo)
cpe:2.3:o:linux:linux_kernel:5.13:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.13:rc2:*:*:*:*:*:*