Description
In the Linux kernel, the following vulnerability has been resolved: netfilter: x_tables: check target name before accessing verdict Non-standard targets may contain only struct xt_entry_target. mark_source_chains() nevertheless reads the target as an xt_standard_target before checking its name, potentially reading four bytes beyond a header-only target. Check that the target is standard before reading its verdict. Non-standard targets remain handled as fallthrough rules. See the following KASAN trace: BUG: KASAN: slab-out-of-bounds in translate_table+0x1660/0x1a40 [ip6_tables] Read of size 4 at addr ffff88800ed56ff8 by task rep/432 Call Trace: kasan_report+0xfa/0x120 translate_table+0x1660/0x1a40 [ip6_tables] do_ip6t_set_ctl+0x667/0xa76 [ip6_tables] nf_setsockopt+0x77/0xd0 do_sock_setsockopt+0x118/0x490 __sys_setsockopt+0xe4/0x160 __x64_sys_setsockopt+0xbd/0x190 do_syscall_64+0xde/0x4f0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Allocated by task 432: kasan_save_stack+0x2f/0x50 __kasan_kmalloc+0x7f/0x90 __kvmalloc_node_noprof+0x1b1/0x5c0 xt_alloc_table_info+0x3c/0xa0 do_ip6t_set_ctl+0x5ee/0xa76 [ip6_tables] nf_setsockopt+0x77/0xd0 do_sock_setsockopt+0x118/0x490 __sys_setsockopt+0xe4/0x160 __x64_sys_setsockopt+0xbd/0x190 do_syscall_64+0xde/0x4f0 entry_SYSCALL_64_after_hwframe+0x77/0x7f
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < b0576f2c406237170fb1e6878ecd3d701703f55baffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < dc52bbdaa3de8a6e5c377ada07039d88cc4e967eaffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < f430dfe58e8c2d3eb26763f0b6147319e5f3387faffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < bf18b0ec873c80e921d7955dc9ebcfa463264cfbaffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < f865566da51a39ff4ead49ded3f79c03f32376a5affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 364b200285bb2cc518e3c5efe6591951c05b8e01affected
Linux Linux
Default version status: affected
2.6.12affected0 to < 2.6.12unaffected5.10.276 to ≤ 5.10.*unaffected5.15.227 to ≤ 5.15.*unaffected6.12.120 to ≤ 6.12.*unaffected6.18.66 to ≤ 6.18.*unaffected7.3.7 to ≤ 7.3.*unaffected7.4-rc3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/b0576f2c406237170fb1e6878ecd3d701703f55b ↗
- https://git.kernel.org/stable/c/dc52bbdaa3de8a6e5c377ada07039d88cc4e967e ↗
- https://git.kernel.org/stable/c/f430dfe58e8c2d3eb26763f0b6147319e5f3387f ↗
- https://git.kernel.org/stable/c/bf18b0ec873c80e921d7955dc9ebcfa463264cfb ↗
- https://git.kernel.org/stable/c/f865566da51a39ff4ead49ded3f79c03f32376a5 ↗
- https://git.kernel.org/stable/c/364b200285bb2cc518e3c5efe6591951c05b8e01 ↗