ipmr: account multicast table and route memory
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f0ad0860d01e47a3ffd220564c5c653b3afbe962 · < 0264b3ee09b118fec8a5471b4ca288f8ab84722f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ipmr: account multicast table and route memory
A netadmin in a user+net namespace can create many IPv4 and IPv6 multicast routing tables with MRT_TABLE and MRT6_TABLE. Each unseen id allocates an mr_table via the shared mr_table_alloc(), links it into the per-net list, and leaves it until netns teardown. Those objects were not charged to memcg, so the host unreclaimable slab grows with the table count.
Account mr_table allocations with GFP_KERNEL_ACCOUNT and mark the IPv4/IPv6 MFC caches SLAB_ACCOUNT. This matches the established handling of IP addresses, routes and alternate interface names.
Unresolved MFC entries are still allocated from softIRQ with GFP_ATOMIC and are not charged. They expire after 10 seconds and are bounded by the socket receive queue; see commit 0079ad8e8dc3 ("ipmr: remove hard code cache_resolve_queue_len limit").
From the CVE record · Linux
The Linux kernel does not charge multicast routing table and route-cache allocations to the memory cgroup. A local attacker with netadmin privileges in a user and network namespace can create many tables, causing host unreclaimable slab memory to grow. No user interaction is described.
Operators running Linux kernels with the affected multicast routing table implementation should check their kernel version; affected versions were not provided.