Read the docs
TI-2021-21747 Aliases CVE-2021-47082GHSA-pfh4-6f3v-4mwm

tun: avoid double free in tun_free_netdev

Priority LOW 34CWE-415Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 2 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-415 and the CVSS impact.

Summary

In the Linux kernel, the following vulnerability has been resolved: tun: avoid double free in tun_free_netdev Avoid double free in tun_free_netdev() by moving the dev->tstats and tun->security allocs to a new ndo_init routine (tun_net_init()) that will be called by register_netdevice(). ndo_init is paired with the desctructor (tun_free_netdev()), so if there's an error in register_netdevice() the destructor will handle the frees. BUG: KASAN: double-free or invalid-free in selinux_tun_dev_free_security+0x1a/0x20 security/selinux/hooks.c:5605 CPU: 0 PID: 25750 Comm: syz-executor416 Not tainted 5.16.0-rc2-syzk #1 Hardware name: Red Hat KVM, BIOS Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x89/0xb5 lib/dump_stack.c:106 print_address_description.constprop.9+0x28/0x160 mm/kasan/report.c:247 kasan_report_invalid_free+0x55/0x80 mm/kasan/report.c:372 ____kasan_slab_free mm/kasan/common.c:346 [inline] __kasan_slab_free+0x107/0x120 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook mm/slub.c:1749 [inline] slab_free mm/slub.c:3513 [inline] kfree+0xac/0x2d0 mm/slub.c:4561 selinux_tun_dev_free_security+0x1a/0x20 security/selinux/hooks.c:5605 security_tun_dev_free_security+0x4f/0x90 security/security.c:2342 tun_free_netdev+0xe6/0x150 drivers/net/tun.c:2215 netdev_run_todo+0x4df/0x840 net/core/dev.c:10627 rtnl_unlock+0x13/0x20 net/core/rtnetlink.c:112 __tun_chr_ioctl+0x80c/0x2870 drivers/net/tun.c:3302 tun_chr_ioctl+0x2f/0x40 drivers/net/tun.c:3311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __x64_sys_ioctl+0x19d/0x220 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3a/0x80 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00252 16th percentileScored 2026-11-07
Fix Partial Linux (Linux): 3.11, 3.12, 4.19.280 +4Red Hat: 2 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
LinuxLinux3.10.16 to before 3.11; 3.11.5 to before 3.123.11, 3.12Patch availableCNA
LinuxLinux3.12 and later4.19.280, 5.4.240, 5.10.136, 5.15.12, 5.16Patch availableCNA
  • Linux VendorLinux Affected 3.10.16 to before 3.11; 3.11.5 to before 3.12 Fixed in 3.11, 3.12 Patch available CNA
  • Linux VendorLinux Affected 3.12 and later Fixed in 4.19.280, 5.4.240, 5.10.136, 5.15.12, 5.16 Patch available CNA

CPE configurations NVD · 7

CPEVersionsRoleVendor
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*before 4.19.280; 4.20 to before 5.4.240; 5.5 to before 5.10.136; 5.11 to before 5.15.12VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:*5.16 rc1VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:*5.16 rc2VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:*5.16 rc3VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.16:rc4:*:*:*:*:*:*5.16 rc4VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.16:rc5:*:*:*:*:*:*5.16 rc5VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.16:rc6:*:*:*:*:*:*5.16 rc6VulnerableLinux
  • cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions before 4.19.280; 4.20 to before 5.4.240; 5.5 to before 5.10.136; 5.11 to before 5.15.12 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.16:rc1:*:*:*:*:*:* Versions 5.16 rc1 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.16:rc2:*:*:*:*:*:* Versions 5.16 rc2 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.16:rc3:*:*:*:*:*:* Versions 5.16 rc3 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.16:rc4:*:*:*:*:*:* Versions 5.16 rc4 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.16:rc5:*:*:*:*:*:* Versions 5.16 rc5 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.16:rc6:*:*:*:*:*:* Versions 5.16 rc6 Vulnerable ·Linux

Remediation

  • Fix · CNA Linux (Linux) Fixed in 3.11, 3.12
  • Fix · CNA Linux (Linux) Fixed in 4.19.280, 5.4.240, 5.10.136, 5.15.12, 5.16

Vendor assessments

Red Hat

Red Hat rating: Low. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux 6AffectedNo fix planned: Out of support scope
Red Hat Enterprise Linux 7AffectedNo fix planned: Out of support scope
Not affected: 2 products
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-47082
  2. 2026-10-03 Alias added: GHSA-pfh4-6f3v-4mwm

References

  • TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
  • TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
  • TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
  • TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
  • TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
  • TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
See all 15278 →

Sources