Overview
About vulnerability
In the Linux kernel, the following vulnerability has been resolved:
netfilter: nf_conntrack_helper: pass helper to expect cleanup
nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy() to remove expectations belonging to the helper being unregistered. However, it passes NULL instead of the helper pointer as the data argument, so expect_iter_me() never matches any expectation and all of them survive the cleanup.
After unregister returns, nfnl_cthelper_del() frees the helper object immediately. Subsequent expectation dumps or packet-driven init_conntrack() calls then dereference the freed exp->helper, causing a use-after-free.
Pass the actual helper pointer so expectations referencing it are properly destroyed before the helper object is freed.
BUG: KASAN: slab-use-after-free in string+0x38f/0x430 Read of size 1 at addr ffff888003b14d20 by task poc/103 Call Trace: string+0x38f/0x430 vsnprintf+0x3cc/0x1170 seq_printf+0x17a/0x240 exp_seq_show+0x2e5/0x560 seq_read_iter+0x419/0x1280 proc_reg_read+0x1ac/0x270 vfs_read+0x179/0x930 ksys_read+0xef/0x1c0 Freed by task 103: The buggy address is located 32 bytes inside of freed 192-byte region [ffff888003b14d00, ffff888003b14dc0)
Details
- Affected product:
- AlmaLinux 9.2 ESU , Amazon Linux 2 ELS , CentOS 8.4 ELS , CentOS 8.5 ELS , CentOS Stream 8 ELS , Debian 10 ELS , Oracle Linux 7 ELS , TuxCare 9.6 ESU , Ubuntu 16.04 ELS , Ubuntu 18.04 ELS , Ubuntu 20.04 ELS
- Affected packages:
- linux @ 5.4.0 (+11 more)
Fixes
KernelCare state
Live-patch status from KernelCare for each operating system.
| Operating system | Status | Covered kernels |
|---|---|---|
| AlmaLinux 10 | Released |
37 kernels
|
| AlmaLinux 8 | Released |
105 kernels
|
| AlmaLinux 9 | Released |
107 kernels
|
| AlmaLinux 9.2 ESU | Released |
21 kernels
|
| AlmaLinux 9.6 ESU | Released |
9 kernels
|
| Amazon Linux 2023 | Planned | — |
| CentOS 8 | Released |
21 kernels
|
| CloudLinux OS 7h | Released |
102 kernels
|
| CloudLinux OS 8 | Released |
99 kernels
|
| Debian 11 | Released |
37 kernels
|
| Debian 11 cloud | Released |
17 kernels
|
| Debian 12 | Planned | — |
| Debian 13 | Planned | — |
| Oracle Linux 8 | Released |
115 kernels
|
| Oracle Linux 9 | Released |
109 kernels
|
| RHEL 10 | Released |
37 kernels
|
| RHEL 8 | Released |
110 kernels
|
| RHEL 9 | Released |
105 kernels
|
| Rocky Linux 10 | Released |
27 kernels
|
| Rocky Linux 8 | Released |
88 kernels
|
| Rocky Linux 9 | Released |
86 kernels
|
| Ubuntu 22.04 | Planned | — |
| Ubuntu 24.04 | Planned | — |