# CVE-2021-47451: netfilter: xt\_IDLETIMER: fix panic that occurs when timer\_type has garbage value

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2024-05-22T06:19:42.082Z
- **Modified:** 2026-08-05T08:47:54.091Z

## Who should check

- Anyone running Linux \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< 2a670c323055282c9b72794a491d53cef86bbeaf; \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< cae7cab804c943d723d52724a3aeb07a3f4a2650; \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e
- Anyone running Linux 5.7

## Description

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

netfilter: xt\_IDLETIMER: fix panic that occurs when timer\_type has garbage value

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

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

Splat looks like:
    BUG: KASAN: user-memory-access in alarm\_expires\_remaining+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:
     dump\_stack\_lvl+0x6e/0x9c
     kasan\_report.cold+0x112/0x117
     ? alarm\_expires\_remaining+0x49/0x70
     \_\_asan\_load8+0x86/0xb0
     alarm\_expires\_remaining+0x49/0x70
     idletimer\_tg\_show+0xe5/0x19b \[xt\_IDLETIMER 11219304af9316a21bee5ba9d58f76a6b9bccc6d\]
     dev\_attr\_show+0x3c/0x60
     sysfs\_kf\_seq\_show+0x11d/0x1f0
     ? device\_remove\_bin\_file+0x20/0x20
     kernfs\_seq\_show+0xa4/0xb0
     seq\_read\_iter+0x29c/0x750
     kernfs\_fop\_read\_iter+0x25a/0x2c0
     ? \_\_fsnotify\_parent+0x3d1/0x570
     ? iov\_iter\_init+0x70/0x90
     new\_sync\_read+0x2a7/0x3d0
     ? \_\_x64\_sys\_llseek+0x230/0x230
     ? rw\_verify\_area+0x81/0x150
     vfs\_read+0x17b/0x240
     ksys\_read+0xd9/0x180
     ? vfs\_write+0x460/0x460
     ? do\_syscall\_64+0x16/0xc0
     ? lockdep\_hardirqs\_on+0x79/0x120
     \_\_x64\_sys\_read+0x43/0x50
     do\_syscall\_64+0x3b/0xc0
     entry\_SYSCALL\_64\_after\_hwframe+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 ORIG\_RAX: 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 and fixed versions

- Linux: \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< 2a670c323055282c9b72794a491d53cef86bbeaf; \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< cae7cab804c943d723d52724a3aeb07a3f4a2650; \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e (cvelist)
- Linux: 5.7 (cvelist)

## Mitigation

- Upgrade Linux to 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47451. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47451.md
Affected: Linux >= 68983a354a655c35d3fb204489d383a2a051fda7, < 2a670c323055282c9b72794a491d53cef86bbeaf; >= 68983a354a655c35d3fb204489d383a2a051fda7, < cae7cab804c943d723d52724a3aeb07a3f4a2650; >= 68983a354a655c35d3fb204489d383a2a051fda7, < 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e; Linux 5.7
Fixed in: Linux 2a670c323055282c9b72794a491d53cef86bbeaf, Linux 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47451 being exploited?

There is no confirmed exploitation: CVE-2021-47451 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47451?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47451?

Linux \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< 2a670c323055282c9b72794a491d53cef86bbeaf; \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< cae7cab804c943d723d52724a3aeb07a3f4a2650; \>= 68983a354a655c35d3fb204489d383a2a051fda7, \< 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e; Linux 5.7.

### Is there a fix for CVE-2021-47451?

Yes. Fixed in Linux 2a670c323055282c9b72794a491d53cef86bbeaf, Linux 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e. Upgrade Linux to 902c0b1887522a099aa4e1e6b4b476c2fe5dd13e or later.

### How do I check if I'm affected by CVE-2021-47451?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/2a670c323055282c9b72794a491d53cef86bbeaf>
- patch: <https://git.kernel.org/stable/c/cae7cab804c943d723d52724a3aeb07a3f4a2650>
- patch: <https://git.kernel.org/stable/c/902c0b1887522a099aa4e1e6b4b476c2fe5dd13e>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47451>

HTML: <https://flawdb.com/CVE-2021-47451> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47451>
