CVE
CVE-2022-49775
CNA description
In the Linux kernel, the following vulnerability has been resolved: tcp: cdg: allow tcp_cdg_release() to be called multiple times Apparently, mptcp is able to call tcp_disconnect() on an already disconnected flow. This is generally fine, unless current congestion control is CDG, because it might trigger a double-free [1] Instead of fixing MPTCP, and future bugs, we can make tcp_disconnect() more resilient. [1] BUG: KASAN: double-free in slab_free mm/slub.c:3539 [inline] BUG: KASAN: double-free in kfree+0xe2/0x580 mm/slub.c:4567 CPU: 0 PID: 3645 Comm: kworker/0:7 Not tainted 6.0.0-syzkaller-02734-g0326074ff465 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Workqueue: events mptcp_worker Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report_invalid_free+0x81/0x190 mm/kasan/report.c:462 ____kasan_slab_free+0x18b/0x1c0 mm/kasan/common.c:356 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1759 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1785 slab_free mm/slub.c:3539 [inline] kfree+0xe2/0x580 mm/slub.c:4567 tcp_disconnect+0x980/0x1e20 net/ipv4/tcp.c:3145 __mptcp_close_ssk+0x5ca/0x7e0 net/mptcp/protocol.c:2327 mptcp_do_fastclose net/mptcp/protocol.c:2592 [inline] mptcp_worker+0x78c/0xff0 net/mptcp/protocol.c:2627 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 </TASK> Allocated by task 3671: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] ____kasan_kmalloc mm/kasan/common.c:516 [inline] ____kasan_kmalloc mm/kasan/common.c:475 [inline] __kasan_kmalloc+0xa9/0xd0…
Affected versions
All Linux kernel vulnerabilities →
- ≥ 5.16, < 6.0.10Fixed in 6.0.10
- ≥ 5.11, < 5.15.80Fixed in 5.15.80
- ≥ 5.5, < 5.10.156Fixed in 5.10.156
- ≥ 4.20, < 5.4.225Fixed in 5.4.225
- ≥ 4.15, < 4.19.267Fixed in 4.19.267
- ≥ 4.10, < 4.14.300Fixed in 4.14.300
- ≥ 4.2, < 4.9.334Fixed in 4.9.334
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/0b19171439016a8e4c97eafe543670ac86e2b8fe · Patch
- git.kernel.org/stable/c/1b639be27cbf428a5ca01dcf8b5d654194c956f8 · Patch
- git.kernel.org/stable/c/35309be06b6feded2ab2cafbc2bca8534c2fa41e · Patch
- git.kernel.org/stable/c/4026033907cc6186d86b48daa4a252c860db2536 · Patch
- git.kernel.org/stable/c/72e560cb8c6f80fc2b4afc5d3634a32465e13a51 · Patch
- git.kernel.org/stable/c/78be2ee0112409ae4e9ee9e326151e0559b3d239 · Patch
- git.kernel.org/stable/c/9e481d87349d2282f400ee1d010a169c99f766b8 · Patch
- git.kernel.org/stable/c/b49026d9c86f35a4c5bfb8d7345c9c4379828c6b · 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.