mm/vmalloc: do not trigger BUG() on BH disabled context
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm/vmalloc: do not trigger BUG() on BH disabled context
__get_vm_area_node() currently triggers a BUG() if in_interrupt() returns true. However, in_interrupt() also reports true when BH are disabled.
The bridge code can call rhashtable_lookup_insert_fast() with bottom halves disabled:
__vlan_add() -> br_fdb_add_local() spin_lock_bh(&br->hash_lock); <-- Disable BH -> fdb_add_local() -> fdb_create() -> rhashtable_lookup_insert_fast() -> kvmalloc() -> vmalloc() -> __get_vm_area_node() -> BUG_ON(in_interrupt()) spin_unlock_bh(&br->hash_lock)
this triggers the BUG() despite the caller not being in NMI or hard IRQ context.
Replace the in_interrupt() check with in_nmi() || in_hardirq().
From the CVE record · Linux
The Linux kernel’s vmalloc path can trigger a BUG() when called with bottom halves disabled, even outside NMI or hard IRQ context. The described bridge VLAN-addition path can reach this condition and crash the kernel; the input does not establish whether an attacker can trigger it remotely or what privileges are required.
Engineers running Linux kernels with the affected mm/vmalloc behavior should check their deployments; affected versions are not specified.