Read the docs
TI-2021-22135 Aliases CVE-2021-47482GHSA-xgm7-3x53-gq2c

net: batman-adv: fix error handling

Priority LOW 25CWE-544Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
High
Impact type
—
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA.

Summary

In the Linux kernel, the following vulnerability has been resolved: net: batman-adv: fix error handling Syzbot reported ODEBUG warning in batadv_nc_mesh_free(). The problem was in wrong error handling in batadv_mesh_init(). Before this patch batadv_mesh_init() was calling batadv_mesh_free() in case of any batadv_*_init() calls failure. This approach may work well, when there is some kind of indicator, which can tell which parts of batadv are initialized; but there isn't any. All written above lead to cleaning up uninitialized fields. Even if we hide ODEBUG warning by initializing bat_priv->nc.work, syzbot was able to hit GPF in batadv_nc_purge_paths(), because hash pointer in still NULL. [1] To fix these bugs we can unwind batadv_*_init() calls one by one. It is good approach for 2 reasons: 1) It fixes bugs on error handling path 2) It improves the performance, since we won't call unneeded batadv_*_free() functions. So, this patch makes all batadv_*_init() clean up all allocated memory before returning with an error to no call correspoing batadv_*_free() and open-codes batadv_mesh_free() with proper order to avoid touching uninitialized fields.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00739 54th percentileScored 2026-11-07
Fix Fixed Linux (Linux): 4.4.293, 4.9.289, 4.14.254 +5

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
LinuxLinux2.6.38 and later4.4.293, 4.9.289, 4.14.254, 4.19.215, 5.4.157, 5.10.77, 5.14.16, 5.15Patch availableCNA
  • Linux VendorLinux Affected 2.6.38 and later Fixed in 4.4.293, 4.9.289, 4.14.254, 4.19.215, 5.4.157, 5.10.77, 5.14.16, 5.15 Patch available CNA

CPE configurations NVD · 8

CPEVersionsRoleVendor
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*2.6.38 to before 4.4.293; 4.5 to before 4.9.289; 4.10 to before 4.14.254; 4.15 to before 4.19.215; 4.20 to before 5.4.157; 5.5 to before 5.10.77; 5.11 to before 5.14.16VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:*5.15 rc1VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:*5.15 rc2VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:*5.15 rc3VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:*5.15 rc4VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:*5.15 rc5VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:*5.15 rc6VulnerableLinux
cpe:2.3:o:linux:linux_kernel:5.15:rc7:*:*:*:*:*:*5.15 rc7VulnerableLinux
  • cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 2.6.38 to before 4.4.293; 4.5 to before 4.9.289; 4.10 to before 4.14.254; 4.15 to before 4.19.215; 4.20 to before 5.4.157; 5.5 to before 5.10.77; 5.11 to before 5.14.16 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:* Versions 5.15 rc1 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:* Versions 5.15 rc2 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* Versions 5.15 rc3 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:* Versions 5.15 rc4 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:* Versions 5.15 rc5 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:* Versions 5.15 rc6 Vulnerable ·Linux
  • cpe:2.3:o:linux:linux_kernel:5.15:rc7:*:*:*:*:*:* Versions 5.15 rc7 Vulnerable ·Linux

Remediation

  • Fix · CNA Linux (Linux) Fixed in 4.4.293, 4.9.289, 4.14.254, 4.19.215, 5.4.157, 5.10.77, 5.14.16, 5.15

Vendor assessments

Red Hat

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

Not affected: 4 products
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-47482
  2. 2026-10-03 Alias added: GHSA-xgm7-3x53-gq2c

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