CVE-2026-139201

netlink: fix out-of-bounds bitmap access clearing stale mc groups

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

netlink: fix out-of-bounds bitmap access clearing stale mc groups

netlink_realloc_groups() sizes nlk->groups to the number of groups
that exist at bind/ADD_MEMBERSHIP time. When more multicast groups
are registered later (e.g. a new genl family), existing sockets keep
their smaller bitmap.

When clearing a multicast group of a departing family,
__netlink_clear_multicast_users() runs netlink_update_socket_mc() on
each socket on mc_list, which does test_bit()/__assign_bit() on
group - 1 with no regard to nlk->ngroups. Skip sockets whose bitmap
predates the group: such a socket can never have joined it.

The overflow windows differ per architecture, both needing privileged
module (un)loading. On 32-bit kernels the ~54 dynamically allocated
genl groups already exceed the initial 32-bit bitmap, so the table
can grow there directly. On 64-bit kernels the same in-tree set fits
the initial 64-bit bitmap only while allocation stays contiguous:
genl_allocate_reserve_groups() takes the first free contiguous range
and unregister does not compact, so an unload/reload sequence can
fragment the ~59 free IDs until no fitting range remains, forcing
the table past 64 bits and reaching the same stale-bitmap overflow on
the next family teardown.

This issue was discovered by Tencent CodeBuddy Security.

Analysis

AI-generated

Technical impact

The vulnerability arises from an out‑of‑bounds bitmap access performed when the netlink subsystem clears stale multicast group entries. During the teardown of a generic netlink family, the kernel tests and assigns bits in a bitmap that may no longer be large enough to hold the group index, allowing memory corruption in kernel space. If an attacker can trigger the cleanup path, this corruption could lead to arbitrary code execution or a kernel panic, effectively compromising system integrity.

Affected Systems

Affected systems are all Linux kernel releases that have not incorporated the commit that introduces bounds checking in the netlink_realloc_groups and netlink_update_socket_mc functions. The patch is part of the Linux kernel source tree, so any distribution shipping an unpatched kernel—including recent mainstream releases before the fix—is susceptible. Exact affected versions cannot be listed from the provided data, but any kernel prior to the commit is considered at risk.

Risk and Exploitability

The risk is high because the flaw modifies kernel memory, and exploitation requires privileged module loading/unloading or interaction with netlink multicast group registration. Although the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, the potential for privilege escalation and remote code execution warrants immediate attention. The attack vector involves manipulating multicast group membership, which can be performed through local unprivileged processes that perform bind or ADD_MEMBERSHIP operations, but the most powerful exploitation would require root or module‑privileged status.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that contains the fix; any kernel patched after the commit adding bounds checking will mitigate the issue.
  • If a kernel upgrade cannot be performed immediately, remove or disable kernel modules that register new generic netlink families or alter netlink multicast groups until the kernel is updated, as the vulnerability is triggered by module load/unload actions.
  • Monitor system logs for signs of netlink bitmap corruption or instability, and restrict module loading or netlink group registration to trusted contexts to reduce exposure.

Generated by OpenCVE AI on November 30, 2026 at 20:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: netlink: fix out-of-bounds bitmap access clearing stale mc groups netlink_realloc_groups() sizes nlk->groups to the number of groups that exist at bind/ADD_MEMBERSHIP time. When more multicast groups are registered later (e.g. a new genl family), existing sockets keep their smaller bitmap. When clearing a multicast group of a departing family, __netlink_clear_multicast_users() runs netlink_update_socket_mc() on each socket on mc_list, which does test_bit()/__assign_bit() on group - 1 with no regard to nlk->ngroups. Skip sockets whose bitmap predates the group: such a socket can never have joined it. The overflow windows differ per architecture, both needing privileged module (un)loading. On 32-bit kernels the ~54 dynamically allocated genl groups already exceed the initial 32-bit bitmap, so the table can grow there directly. On 64-bit kernels the same in-tree set fits the initial 64-bit bitmap only while allocation stays contiguous: genl_allocate_reserve_groups() takes the first free contiguous range and unregister does not compact, so an unload/reload sequence can fragment the ~59 free IDs until no fitting range remains, forcing the table past 64 bits and reaching the same stale-bitmap overflow on the next family teardown. This issue was discovered by Tencent CodeBuddy Security.
Title netlink: fix out-of-bounds bitmap access clearing stale mc groups
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM