{"id":77155,"date":"2026-02-14T20:45:58","date_gmt":"2026-02-14T17:15:58","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2026-23209-macvlan-fix-error-recovery-in-macvlan_common_newlink\/"},"modified":"2026-02-14T20:45:58","modified_gmt":"2026-02-14T17:15:58","slug":"cve-2026-23209-macvlan-fix-error-recovery-in-macvlan_common_newlink","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2026-23209-macvlan-fix-error-recovery-in-macvlan_common_newlink\/","title":{"rendered":"CVE-2026-23209 &#8211; macvlan: fix error recovery in macvlan_common_newlink()"},"content":{"rendered":"<p>CVE ID : CVE-2026-23209<\/p>\n<p>Published :  Feb. 14, 2026, 5:15 p.m. | 1\u00a0hour, 14\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>macvlan: fix error recovery in macvlan_common_newlink()<\/p>\n<p>valis provided a nice repro to crash the kernel:<\/p>\n<p>ip link add p1 type veth peer p2<br \/>\nip link set address 00:00:00:00:00:20 dev p1<br \/>\nip link set up dev p1<br \/>\nip link set up dev p2<\/p>\n<p>ip link add mv0 link p2 type macvlan mode source<br \/>\nip link add invalid% link p2 type macvlan mode source macaddr add 00:00:00:00:00:20<\/p>\n<p>ping -c1 -I p1 1.2.3.4<\/p>\n<p>He also gave a very detailed analysis:<\/p>\n<p>The issue is triggered when a new macvlan link is created  with<br \/>\nMACVLAN_MODE_SOURCE mode and MACVLAN_MACADDR_ADD (or<br \/>\nMACVLAN_MACADDR_SET) parameter, lower device already has a macvlan<br \/>\nport and register_netdevice() called from macvlan_common_newlink()<br \/>\nfails (e.g. because of the invalid link name).<\/p>\n<p>In this case macvlan_hash_add_source is called from<br \/>\nmacvlan_change_sources() \/ macvlan_common_newlink():<\/p>\n<p>This adds a reference to vlan to the port&#8217;s vlan_source_hash using<br \/>\nmacvlan_source_entry.<\/p>\n<p>vlan is a pointer to the priv data of the link that is being created.<\/p>\n<p>When register_netdevice() fails, the error is returned from<br \/>\nmacvlan_newlink() to rtnl_newlink_create():<\/p>\n<p>        if (ops-&gt;newlink)<br \/>\n                err = ops-&gt;newlink(dev, &amp;params, extack);<br \/>\n        else<br \/>\n                err = register_netdevice(dev);<br \/>\n        if (err <\/p>\n<p>With all that, my fix is to make sure we call macvlan_flush_sources()<br \/>\nregardless of @create value whenever &#8220;goto destroy_macvlan_port;&#8221;<br \/>\npath is taken.<\/p>\n<p>Many thanks to valis for following up on this issue.<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2026-23209 Published : Feb. 14, 2026, 5:15 p.m. | 1\u00a0hour, 14\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: macvlan: fix error recovery in macvlan_common_newlink() valis provided a nice repro to crash the kernel: ip link add p1 type veth peer p2 ip link set address 00:00:00:00:00:20 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-77155","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/77155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=77155"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/77155\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=77155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=77155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=77155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}