Skip to content

CVE-2024-50045 netfilter: br_netfilter: fix panic with metadata_dst skb

MediumCVSS 5.5 EPSS 0.61%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
Linux KernelUbuntuDebian

Description

In the Linux kernel, the following vulnerability has been resolved:

netfilter: br_netfilter: fix panic with metadata_dst skb

Fix a kernel panic in the br_netfilter module when sending untagged
traffic via a VxLAN device.
This happens during the check for fragmentation in br_nf_dev_queue_xmit.

It is dependent on:

  1. the br_netfilter module being loaded;
  2. net.bridge.bridge-nf-call-iptables set to 1;
  3. a bridge with a VxLAN (single-vxlan-device) netdevice as a bridge port;
  4. untagged frames with size higher than the VxLAN MTU forwarded/flooded

When forwarding the untagged packet to the VxLAN bridge port, before
the netfilter hooks are called, br_handle_egress_vlan_tunnel is called and
changes the skb_dst to the tunnel dst. The tunnel_dst is a metadata type
of dst, i.e., skb_valid_dst(skb) is false, and metadata->dst.dev is NULL.

Then in the br_netfilter hooks, in br_nf_dev_queue_xmit, there's a check
for frames that needs to be fragmented: frames with higher MTU than the
VxLAN device end up calling br_nf_ip_fragment, which in turns call
ip_skb_dst_mtu.

The ip_dst_mtu tries to use the skb_dst(skb) as if it was a valid dst
with valid dst->dev, thus the crash.

This case was never supported in the first place, so drop the packet
instead.

PING 10.0.0.2 (10.0.0.2) from 0.0.0.0 h1-eth0: 2000(2028) bytes of data.
[ 176.291791] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000110
[ 176.292101] Mem abort info:
[ 176.292184] ESR = 0x0000000096000004
[ 176.292322] EC = 0x25: DABT (current EL), IL = 32 bits
[ 176.292530] SET = 0, FnV = 0
[ 176.292709] EA = 0, S1PTW = 0
[ 176.292862] FSC = 0x04: level 0 translation fault
[ 176.293013] Data abort info:
[ 176.293104] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
[ 176.293488] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 176.293787] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 176.293995] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000043ef5000
[ 176.294166] [0000000000000110] pgd=0000000000000000,
p4d=0000000000000000
[ 176.294827] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[ 176.295252] Modules linked in: vxlan ip6_udp_tunnel udp_tunnel veth
br_netfilter bridge stp llc ipv6 crct10dif_ce
[ 176.295923] CPU: 0 PID: 188 Comm: ping Not tainted
6.8.0-rc3-g5b3fbd61b9d1 #2
[ 176.296314] Hardware name: linux,dummy-virt (DT)
[ 176.296535] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS
BTYPE=--)
[ 176.296808] pc : br_nf_dev_queue_xmit+0x390/0x4ec [br_netfilter]
[ 176.297382] lr : br_nf_dev_queue_xmit+0x2ac/0x4ec [br_netfilter]
[ 176.297636] sp : ffff800080003630
[ 176.297743] x29: ffff800080003630 x28: 0000000000000008 x27:
ffff6828c49ad9f8
[ 176.298093] x26: ffff6828c49ad000 x25: 0000000000000000 x24:
00000000000003e8
[ 176.298430] x23: 0000000000000000 x22: ffff6828c4960b40 x21:
ffff6828c3b16d28
[ 176.298652] x20: ffff6828c3167048 x19: ffff6828c3b16d00 x18:
0000000000000014
[ 176.298926] x17: ffffb0476322f000 x16: ffffb7e164023730 x15:
0000000095744632
[ 176.299296] x14: ffff6828c3f1c880 x13: 0000000000000002 x12:
ffffb7e137926a70
[ 176.299574] x11: 0000000000000001 x10: ffff6828c3f1c898 x9 :
0000000000000000
[ 176.300049] x8 : ffff6828c49bf070 x7 : 0008460f18d5f20e x6 :
f20e0100bebafeca
[ 176.300302] x5 : ffff6828c7f918fe x4 : ffff6828c49bf070 x3 :
0000000000000000
[ 176.300586] x2 : 0000000000000000 x1 : ffff6828c3c7ad00 x0 :
ffff6828c7f918f0
[ 176.300889] Call trace:
[ 176.301123] br_nf_dev_queue_xmit+0x390/0x4ec [br_netfilter]
[ 176.301411] br_nf_post_routing+0x2a8/0x3e4 [br_netfilter]
[ 176.301703] nf_hook_slow+0x48/0x124
[ 176.302060] br_forward_finish+0xc8/0xe8 [bridge]
[ 176.302371] br_nf_hook_thresh+0x124/0x134 [br_netfilter]
[ 176.302605] br_nf_forward_finish+0x118/0x22c [br_netfilter]
[ 176.302824] br_nf_forward_ip.part.0+0x264/0x290 [br_netfilter]
[ 176.303136] br_nf_forward+0x2b8/0x4e0 [br_netfilter]
[ 176.303359] nf_hook_slow+0x48/0x124
[ 176.303
---truncated---

Upgrade path

17 packages: 17 fixed.

PackageAffectedFixed inStatus
debian/linux(Debian 12) < 6.1.115-1; = 6.1.27-1; = 6.1.37-1; = 6.1.38-1 +27 more 6.1.115-1 Fixed
debian/linux(Debian 13) < 6.11.4-1 6.11.4-1 Fixed
debian/linux(Debian 14) < 6.11.4-1 6.11.4-1 Fixed
Linux kernel < 4.19.323; < 5.4.285; < 5.10.227; < 5.15.168 +20 more 4.19.323, 5.4.285, 5.10.227, 5.15.168, 6.1.113, 6.6.57, 6.11.4, 6.12, 75dfcb758015c97e1accd6340691fca67d363bed, 78ed917133b118661e1fe62d4a85d5d428ee9568, 95c0cff5a1a5d28bf623b92eb5d1a8f56ed30803, 3453f5839420bfbb85c86c61e49f49ffd0f041c4, 915717e0bb9837cc5c101bc545af487bd787239e, cce8419b8168f6e7eb637103a47f916f3de8bc81, f07131239a76cc10d5e82c19d91f53cb55727297, f9ff7665cd128012868098bbd07e28993e314fdb Fixed
Microsoft azure linux < 6.6.57.1-1 6.6.57.1-1 Fixed
Siemens RUGGEDCOM RST2428P < V3.2 V3.2 Fixed
Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < V3.2 V3.2 Fixed
Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 family < V3.2 V3.2 Fixed
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5 Fixed
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5 Fixed
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem < V1.1.1 V1.1.1 Fixed
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5 Fixed
ubuntu/linux(Ubuntu 22.04) < 5.15.0-127.137 5.15.0-127.137 Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-56.58 6.8.0-56.58 Fixed
ubuntu/linux-kvm(Ubuntu 22.04) < 5.15.0-1070.75 5.15.0-1070.75 Fixed
ubuntu/linux-raspi(Ubuntu 22.04) < 5.15.0-1066.69 5.15.0-1066.69 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1028.32 6.8.0-1028.32 Fixed

Affected products

ProductAffected versionsFixed in
Microsoft azure linux < 6.6.57.1-1 6.6.57.1-1
debian/linux(Debian:12) < 6.1.115-1 6.1.115-1
debian/linux(Debian:12) = 6.1.106-1 No fix listed
debian/linux(Debian:12) = 6.1.106-2 No fix listed
debian/linux(Debian:12) = 6.1.106-3 No fix listed
debian/linux(Debian:12) = 6.1.112-1 No fix listed
debian/linux(Debian:12) = 6.1.27-1 No fix listed
debian/linux(Debian:12) = 6.1.37-1 No fix listed
debian/linux(Debian:12) = 6.1.38-1 No fix listed
debian/linux(Debian:12) = 6.1.38-2 No fix listed
debian/linux(Debian:12) = 6.1.38-2~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.38-3 No fix listed
debian/linux(Debian:12) = 6.1.38-4 No fix listed
debian/linux(Debian:12) = 6.1.38-4~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.52-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1 No fix listed
debian/linux(Debian:12) = 6.1.55-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.64-1 No fix listed
debian/linux(Debian:12) = 6.1.66-1 No fix listed
debian/linux(Debian:12) = 6.1.67-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1 No fix listed
debian/linux(Debian:12) = 6.1.69-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.76-1 No fix listed
debian/linux(Debian:12) = 6.1.76-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.82-1 No fix listed
Show 45 more
ProductAffected versionsFixed in
debian/linux(Debian:12) = 6.1.85-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1 No fix listed
debian/linux(Debian:12) = 6.1.90-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.94-1 No fix listed
debian/linux(Debian:12) = 6.1.94-1~bpo11+1 No fix listed
debian/linux(Debian:12) = 6.1.98-1 No fix listed
debian/linux(Debian:12) = 6.1.99-1 No fix listed
debian/linux(Debian:13) < 6.11.4-1 6.11.4-1
debian/linux(Debian:14) < 6.11.4-1 6.11.4-1
ubuntu/linux(Ubuntu:22.04) < 5.15.0-127.137 5.15.0-127.137
ubuntu/linux-kvm(Ubuntu:22.04) < 5.15.0-1070.75 5.15.0-1070.75
ubuntu/linux-raspi(Ubuntu:22.04) < 5.15.0-1066.69 5.15.0-1066.69
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < f07131239a76cc10d5e82c19d91f53cb55727297 f07131239a76cc10d5e82c19d91f53cb55727297
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < 75dfcb758015c97e1accd6340691fca67d363bed 75dfcb758015c97e1accd6340691fca67d363bed
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < cce8419b8168f6e7eb637103a47f916f3de8bc81 cce8419b8168f6e7eb637103a47f916f3de8bc81
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < 95c0cff5a1a5d28bf623b92eb5d1a8f56ed30803 95c0cff5a1a5d28bf623b92eb5d1a8f56ed30803
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < 78ed917133b118661e1fe62d4a85d5d428ee9568 78ed917133b118661e1fe62d4a85d5d428ee9568
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < 3453f5839420bfbb85c86c61e49f49ffd0f041c4 3453f5839420bfbb85c86c61e49f49ffd0f041c4
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < 915717e0bb9837cc5c101bc545af487bd787239e 915717e0bb9837cc5c101bc545af487bd787239e
Linux kernel >= 11538d039ac6efcf4f1a6c536e1b87cd3668a9fd, < f9ff7665cd128012868098bbd07e28993e314fdb f9ff7665cd128012868098bbd07e28993e314fdb
Linux kernel = 4.11 No fix listed
Linux kernel < 4.19.323 4.19.323
Linux kernel < 5.4.285 5.4.285
Linux kernel < 5.10.227 5.10.227
Linux kernel < 5.15.168 5.15.168
Linux kernel < 6.1.113 6.1.113
Linux kernel < 6.6.57 6.6.57
Linux kernel < 6.11.4 6.11.4
Linux kernel < 6.12 6.12
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5
Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5
Siemens SIMATIC S7-1500 TM MFP - GNU/Linux subsystem < V1.1.1 V1.1.1
Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP >= V3.1.0, < V3.1.5 V3.1.5
Siemens RUGGEDCOM RST2428P < V3.2 V3.2
Siemens SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family < V3.2 V3.2
Siemens SCALANCE XCM-/XRM-/XCH-/XRH-300 family < V3.2 V3.2
ubuntu/linux(Ubuntu:24.04) < 6.8.0-56.58 6.8.0-56.58
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1028.32 6.8.0-1028.32
Linux kernel >= 4.11, < 5.10.227 5.10.227
Linux kernel >= 5.11, < 5.15.168 5.15.168
Linux kernel >= 5.16, < 6.1.113 6.1.113
Linux kernel >= 6.2, < 6.6.57 6.6.57
Linux kernel >= 6.7, < 6.11.4 6.11.4
Linux kernel = 6.12-rc1 No fix listed
Linux kernel = 6.12-rc2 No fix listed

References