CVE-2022-49853: net: macvlan: fix memory leaks of macvlan_common_newlink
In the Linux kernel, the following vulnerability has been resolved:
net: macvlan: fix memory leaks of macvlan_common_newlink
kmemleak reports memory leaks in macvlan_common_newlink, as follows:
ip link add link eth0 name .. type macvlan mode source macaddr add
<MAC-ADDR>
kmemleak reports:
unreferenced object 0xffff8880109bb140 (size 64):
comm "ip", pid 284, jiffies 4294986150 (age 430.108s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 b8 aa 5a 12 80 88 ff ff ..........Z.....
80 1b fa 0d 80 88 ff ff 1e ff ac af c7 c1 6b 6b ..............kk
backtrace:
[<ffffffff813e06a7>] kmem_cache_alloc_trace+0x1c7/0x300
[<ffffffff81b66025>] macvlan_hash_add_source+0x45/0xc0
[<ffffffff81b66a67>] macvlan_changelink_sources+0xd7/0x170
[<ffffffff81b6775c>] macvlan_common_newlink+0x38c/0x5a0
[<ffffffff81b6797e>] macvlan_newlink+0xe/0x20
[<ffffffff81d97f8f>] __rtnl_newlink+0x7af/0xa50
[<ffffffff81d98278>] rtnl_newlink+0x48/0x70
...
In the scenario where the macvlan mode is configured as 'source',
macvlan_changelink_sources() will be execured to reconfigure list of
remote source mac addresses, at the same time, if register_netdevice()
return an error, the resource generated by macvlan_changelink_sources()
is not cleaned up.
Using this patch, in the case of an error, it will execute
macvlan_flush_sources() to ensure that the resource is cleaned up.
Security readout for executives and security teams
Plain-English summary
CVE-2022-49853 is a Linux kernel memory leak in macvlan setup. A local user with privileges to create macvlan links could trigger failed setup paths that leave allocated memory behind, potentially degrading availability over time. The source bundle shows no active exploitation and no data theft or integrity impact.
Executive priority
Treat as routine-to-priority Linux kernel hygiene unless affected hosts are shared, multi-tenant, or grant local network administration rights broadly. The business risk is service degradation from memory pressure, not confirmed remote takeover.
Technical view
The leak occurs in macvlan_common_newlink when macvlan mode is source. macvlan_changelink_sources allocates source MAC resources, but if register_netdevice returns an error, those resources are not cleaned up. The kernel fix calls macvlan_flush_sources on the error path. CVSS is 5.5, local, low complexity, low privileges, availability high.
Likely exposure
Exposure is mainly Linux systems where local users or processes can exercise macvlan link creation, commonly requiring network administration privileges. Systems not using macvlan, or where untrusted users lack local network configuration privileges, are less exposed. Distribution-specific affected and fixed package mapping is not provided in the bundle.
Exploitation context
The provided evidence describes a local availability issue and a kmemleak finding, not remote compromise. KEV status is false, and the bundle provides no cited evidence of active exploitation. Triggering depends on a specific macvlan source-mode setup path and an error during device registration.
Researcher notes
Evidence supports CWE-401 memory leak in a macvlan error path. The affected version data is upstream-oriented and includes commit hashes and kernel release markers, but does not provide distribution package names. Do not infer exploit availability beyond local availability impact.
Mitigation direction
Update to a Linux kernel or vendor package containing the referenced stable fix.
Check your Linux distribution advisory for affected and fixed kernel package versions.
Restrict local network administration privileges to trusted users and services.
Review macvlan use on shared or multi-tenant Linux hosts.
Validation and detection
Inventory Linux hosts and running kernel versions.
Identify hosts using macvlan or allowing macvlan creation by local users.
Check kernel package changelogs for the referenced stable commits.
Confirm scanners map findings to vendor-fixed kernel packages, not only upstream versions.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-401: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-401 · source CWE mapping
Missing Release of Memory after Effective Lifetime
Missing Release of Memory after Effective Lifetime represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.