CVE
CVE-2021-47078
CNA description
In the Linux kernel, the following vulnerability has been resolved: RDMA/rxe: Clear all QP fields if creation failed rxe_qp_do_cleanup() relies on valid pointer values in QP for the properly created ones, but in case rxe_qp_from_init() failed it was filled with garbage and caused tot the following error. refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 12560 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28 Modules linked in: CPU: 1 PID: 12560 Comm: syz-executor.4 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28 Code: 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: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000040000 RSI: ffffffff815bb075 RDI: fffff520012f9d67 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815b4eae R11: 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: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] kref_put include/linux/kref.h:64 [inline] rxe_qp_do_cleanup+0x96f/0xaf0 drivers/infiniband/sw/rxe/rxe_qp.c:805 execute_in_process_context+0x37/0x150…
Affected versions
All Linux kernel vulnerabilities →
- 5.13-rc2This version only
- 5.13-rc1This version only
- ≥ 5.11, < 5.12.7Fixed in 5.12.7
- ≥ 5.5, < 5.10.40Fixed in 5.10.40
- ≥ 4.20, < 5.4.122Fixed in 5.4.122
- ≥ 4.15, < 4.19.192Fixed in 4.19.192
- ≥ 4.10, < 4.14.234Fixed in 4.14.234
- ≥ 4.8, < 4.9.270Fixed in 4.9.270
Distribution packages (Debian, Ubuntu, Red Hat…) backport fixes without changing the upstream version: check your distribution’s advisory as well.
Advisories and patches
- git.kernel.org/stable/c/03344e843ab6dd3b3f2cadfb65ed910590856c70 · Patch
- git.kernel.org/stable/c/2ee4d79c364914989c80de382c0b1a7259a7e4b3 · Patch
- git.kernel.org/stable/c/67f29896fdc83298eed5a6576ff8f9873f709228 · Patch
- git.kernel.org/stable/c/6a8086a42dfbf548a42bf2ae4faa291645c72c66 · Patch
- git.kernel.org/stable/c/a62225d951d77eb20208fed8fc199e0c9b1df08b · Patch
- git.kernel.org/stable/c/c65391dd9f0a47617e96e38bd27e277cbe1c40b0 · Patch
- git.kernel.org/stable/c/f3783c415bf6d2ead3d7aa2c38802bbe10723646 · Patch
Data: NVD (public domain), CISA KEV (CC0), FIRST EPSS, OSV.dev / GitHub Advisory Database (CC-BY 4.0) · This database lists affected versions and fixes only. It never hosts or links exploit code.