CVE-2021-47451: netfilter: xt_IDLETIMER: fix panic that occurs when timer_type has garbage value

Published May 22, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

netfilter: xtIDLETIMER: fix panic that occurs when timertype has garbage value

Currently, when the rule related to IDLETIMER is added, idletimertg timer structure is initialized by kmalloc on executing idletimertgcreate function. However, in this process timer->timertype is not defined to a specific value. Thus, timer->timertype has garbage value and it occurs kernel panic. So, this commit fixes the panic by initializing timer->timertype using kzalloc instead of kmalloc.

Test commands: # iptables -A OUTPUT -j IDLETIMER --timeout 1 --label test $ cat /sys/class/xtidletimer/timers/test Killed

Splat looks like: BUG: KASAN: user-memory-access in alarmexpiresremaining+0x49/0x70 Read of size 8 at addr 0000002e8c7bc4c8 by task cat/917 CPU: 12 PID: 917 Comm: cat Not tainted 5.14.0+ #3 79940a339f71eb14fc81aee1757a20d5bf13eb0e Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: dumpstacklvl+0x6e/0x9c kasanreport.cold+0x112/0x117 ? alarmexpiresremaining+0x49/0x70 asanload8+0x86/0xb0 alarmexpiresremaining+0x49/0x70 idletimertgshow+0xe5/0x19b [xtIDLETIMER 11219304af9316a21bee5ba9d58f76a6b9bccc6d] devattrshow+0x3c/0x60 sysfskfseqshow+0x11d/0x1f0 ? deviceremovebinfile+0x20/0x20 kernfsseqshow+0xa4/0xb0 seqreaditer+0x29c/0x750 kernfsfopreaditer+0x25a/0x2c0 ? fsnotifyparent+0x3d1/0x570 ? ioviterinit+0x70/0x90 newsyncread+0x2a7/0x3d0 ? x64sysllseek+0x230/0x230 ? rwverifyarea+0x81/0x150 vfsread+0x17b/0x240 ksysread+0xd9/0x180 ? vfswrite+0x460/0x460 ? dosyscall64+0x16/0xc0 ? lockdephardirqson+0x79/0x120 x64sysread+0x43/0x50 dosyscall64+0x3b/0xc0 entrySYSCALL64afterhwframe+0x44/0xae RIP: 0033:0x7f0cdc819142 Code: c0 e9 c2 fe ff ff 50 48 8d 3d 3a ca 0a 00 e8 f5 19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24 RSP: 002b:00007fff28eee5b8 EFLAGS: 00000246 ORIGRAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f0cdc819142 RDX: 0000000000020000 RSI: 00007f0cdc032000 RDI: 0000000000000003 RBP: 00007f0cdc032000 R08: 00007f0cdc031010 R09: 0000000000000000 R10: 0000000000000022 R11: 0000000000000246 R12: 00005607e9ee31f0 R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000

Affected Software

72 affected components
Linux Linux kernel
Linux Linux kernel>=5.7<5.10.76
Linux Linux kernel>=5.11<5.14.15
Linux Linux kernel=5.15-rc1
Linux Linux kernel=5.15-rc2
Linux Linux kernel=5.15-rc3
Linux Linux kernel=5.15-rc4
Linux Linux kernel=5.15-rc5
Linux Linux kernel=5.15-rc6
ubuntu/linux-hwe-edge*
ubuntu/linux-aws-5.0*
ubuntu/linux-aws-5.3*
ubuntu/linux-azure*
ubuntu/linux-azure-5.3*
ubuntu/linux-azure-edge*
ubuntu/linux-gcp*
ubuntu/linux-gcp-5.3*
ubuntu/linux-gke-4.15*
ubuntu/linux-gke-5.4*
ubuntu/linux-gkeop-5.4*
ubuntu/linux-hwe*
ubuntu/linux-hwe-edge*
ubuntu/linux-oem*
ubuntu/linux-oracle-5.0*
ubuntu/linux-oracle-5.3*
ubuntu/linux-aws-5.11*
ubuntu/linux-aws-5.13*
ubuntu/linux-aws-5.8*
ubuntu/linux-azure-5.11*
ubuntu/linux-azure-5.13*
ubuntu/linux-azure-5.8*
ubuntu/linux-azure-fde*
ubuntu/linux-gcp-5.11*
ubuntu/linux-gcp-5.13*
ubuntu/linux-gcp-5.8*
ubuntu/linux-gke*
ubuntu/linux-gke-5.15*
ubuntu/linux-hwe-5.11*
ubuntu/linux-hwe-5.13*
ubuntu/linux-hwe-5.8*
ubuntu/linux-intel-5.13*
ubuntu/linux-oem-5.10*
ubuntu/linux-oem-5.13*
ubuntu/linux-oem-5.6*
ubuntu/linux-oracle-5.11*
ubuntu/linux-oracle-5.13*
ubuntu/linux-oracle-5.8*
ubuntu/linux-raspi2*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.11*
ubuntu/linux-riscv-5.8*
ubuntu/linux-allwinner-5.19*
ubuntu/linux-aws-5.19*
ubuntu/linux-aws-6.2*
ubuntu/linux-azure-5.19*
ubuntu/linux-azure-6.2*
ubuntu/linux-azure-fde-5.19*
ubuntu/linux-azure-fde-6.2*
ubuntu/linux-gcp-5.19*
ubuntu/linux-gcp-6.2*
ubuntu/linux-hwe-5.19*
ubuntu/linux-hwe-6.2*
ubuntu/linux-lowlatency-hwe-5.19*
ubuntu/linux-lowlatency-hwe-6.2*
ubuntu/linux-nvidia-6.2*
ubuntu/linux-oem-5.17*
ubuntu/linux-oem-6.0*
ubuntu/linux-oem-6.1*
ubuntu/linux-riscv*
ubuntu/linux-riscv-5.19*
ubuntu/linux-starfive-5.19*
ubuntu/linux-starfive-6.2*

Event History

May 22, 2024
CVE Published
via MITRE·06:19 AM
Data Sourced
via MITRE·06:19 AM
Description
Data Sourced
via OSV·07:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:15 AM
Description
Sep 24, 2025
Data Sourced
via NVD·01:18 AM
RemedySeverityWeaknessAffected Software
Aug 4, 2026
Data Sourced
via MITRE·09:00 AM
Severity
Event
via MITRE·09:00 AM
Updated
via NVD·10:17 AM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2021-47451?

CVE-2021-47451 is classified as a medium severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2021-47451?

To fix CVE-2021-47451, update your Linux kernel to version 5.14.0 or later.

3

What does CVE-2021-47451 affect?

CVE-2021-47451 affects the netfilter component of the Linux kernel specifically related to the IDLETIMER.

4

What is the nature of the vulnerability in CVE-2021-47451?

CVE-2021-47451 is a vulnerability that can cause a panic when the idletimer_tg timer structure is initialized with garbage values.

5

When was CVE-2021-47451 resolved?

CVE-2021-47451 was resolved with patches released after the identification of the vulnerability.

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.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203