CWE
770
Advisory Published
CVE Published
Updated

CVE-2024-42082: xdp: Remove WARN() from __xdp_reg_mem_model()

First published: Mon Jul 29 2024(Updated: )

In the Linux kernel, the following vulnerability has been resolved: xdp: Remove WARN() from __xdp_reg_mem_model() syzkaller reports a warning in __xdp_reg_mem_model(). The warning occurs only if __mem_id_init_hash_table() returns an error. It returns the error in two cases: 1. memory allocation fails; 2. rhashtable_init() fails when some fields of rhashtable_params struct are not initialized properly. The second case cannot happen since there is a static const rhashtable_params struct with valid fields. So, warning is only triggered when there is a problem with memory allocation. Thus, there is no sense in using WARN() to handle this error and it can be safely removed. WARNING: CPU: 0 PID: 5065 at net/core/xdp.c:299 __xdp_reg_mem_model+0x2d9/0x650 net/core/xdp.c:299 CPU: 0 PID: 5065 Comm: syz-executor883 Not tainted 6.8.0-syzkaller-05271-gf99c5f563c17 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:__xdp_reg_mem_model+0x2d9/0x650 net/core/xdp.c:299 Call Trace: xdp_reg_mem_model+0x22/0x40 net/core/xdp.c:344 xdp_test_run_setup net/bpf/test_run.c:188 [inline] bpf_test_run_xdp_live+0x365/0x1e90 net/bpf/test_run.c:377 bpf_prog_test_run_xdp+0x813/0x11b0 net/bpf/test_run.c:1267 bpf_prog_test_run+0x33a/0x3b0 kernel/bpf/syscall.c:4240 __sys_bpf+0x48d/0x810 kernel/bpf/syscall.c:5649 __do_sys_bpf kernel/bpf/syscall.c:5738 [inline] __se_sys_bpf kernel/bpf/syscall.c:5736 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5736 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 Found by Linux Verification Center (linuxtesting.org) with syzkaller.

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
redhat/kernel<5.10.221
5.10.221
redhat/kernel<5.15.162
5.15.162
redhat/kernel<6.1.97
6.1.97
redhat/kernel<6.6.37
6.6.37
redhat/kernel<6.9.8
6.9.8
redhat/kernel<6.10
6.10
Linux Kernel<4.18
Linux Kernel>=4.19<5.10.221
Linux Kernel>=5.11<5.15.162
Linux Kernel>=5.16<6.1.97
Linux Kernel>=6.2<6.6.37
Linux Kernel>=6.7<6.9.8
debian/linux
5.10.223-1
5.10.234-1
6.1.129-1
6.1.133-1
6.12.22-1
debian/linux-6.1
6.1.129-1~deb11u1

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2024-42082?

    The severity of CVE-2024-42082 is considered moderate due to the warning generated in the Linux kernel when certain conditions are met.

  • How do I fix CVE-2024-42082?

    To fix CVE-2024-42082, upgrade your Linux kernel to one of the patched versions including 5.10.221, 5.15.162, 6.1.97, 6.6.37, or later.

  • Which Linux kernel versions are affected by CVE-2024-42082?

    CVE-2024-42082 affects Linux kernel versions from 4.18 up to but not including 5.10.221, 5.11 to 5.15.162, 5.16 to 6.1.97, and 6.2 to 6.6.37.

  • Is CVE-2024-42082 limited to any specific Linux distributions?

    CVE-2024-42082 is reported on both Red Hat and Debian-based distributions with specific kernel versions affected.

  • What is the impact of CVE-2024-42082 on system performance?

    The impact of CVE-2024-42082 is limited to the generation of warnings in the log, which may not affect overall system performance significantly.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203