{"id":"CVE-2026-139207","state":"PUBLISHED","title":"net/mlx5e: IPsec, Fix out-of-bounds comparison of neighbour keys","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: IPsec, Fix out-of-bounds comparison of neighbour keys\n\nmlx5e_ipsec_netevent_event() keeps the L2 headers of offloaded tunnel\nmode SAs up to date: on every neighbour change it looks for SAs whose\nendpoint matches the neighbour's address. The compare width, 4 bytes for\nIPv4 or 16 for IPv6, is chosen from the SA's address family, with no\ncheck that the neighbour is of the same family.\n\nAn ARP entry only stores a 4-byte key, so with an IPv6 tunnel mode SA\noffloaded, any IPv4 neighbour update in the system is compared as if it\nwere a 16-byte IPv6 address, reading past the end of the object:\n\n  BUG: KASAN: slab-out-of-bounds in mlx5e_ipsec_netevent_event+0x736/0x8d0 [mlx5_core]\n  Read of size 4 at addr ff110001260a4ad8 by task swapper/8/0\n  Call Trace:\n   <IRQ>\n   mlx5e_ipsec_netevent_event+0x736/0x8d0 [mlx5_core]\n   notifier_call_chain+0x97/0x2b0\n   atomic_notifier_call_chain+0x5d/0x130\n   neigh_timer_handler+0x35c/0x1140\n   call_timer_fn+0x164/0x490\n   __run_timers+0x5b9/0x960\n   run_timer_softirq+0xf0/0x1d0\n   handle_softirqs+0x189/0x8a0\n   __irq_exit_rcu+0x10d/0x250\n   ...\n\n  Allocated by task 1015:\n   __kmalloc_noprof+0x2e6/0x8b0\n   ___neigh_create+0xcc9/0x24c0\n   ip_finish_output2+0xfc7/0x1e80\n   ip_output+0x172/0x3b0\n   ip_send_skb+0xa5/0x1b0\n   udp_send_skb+0x852/0x10f0\n   udp_sendmsg+0x1333/0x2150\n   ...\n\nThe opposite mix (IPv4 SA with IPv6 neighbour) stays in bounds, but only\nthe first 32 bits of the IPv6 address are compared, so an unrelated\nneighbour can match.\n\nSkip neighbours whose address family doesn't match the SA.","publishedAt":"2026-11-30T13:32:34.217Z","updatedAt":"2026-11-30T13:32:34.217Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"86d331636b6bf543ad9cdf4953f49101d5b73f8b","versionType":"git"},{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"8048922f22665406ed9279dd5cc38ead9c30e48b","versionType":"git"},{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"aeb02b5806d30a66d081271b41176c4f0d654540","versionType":"git"},{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"520631554a689d2cd52452578f3140f045730ee0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c"]}],"references":["https://git.kernel.org/stable/c/86d331636b6bf543ad9cdf4953f49101d5b73f8b","https://git.kernel.org/stable/c/8048922f22665406ed9279dd5cc38ead9c30e48b","https://git.kernel.org/stable/c/aeb02b5806d30a66d081271b41176c4f0d654540","https://git.kernel.org/stable/c/520631554a689d2cd52452578f3140f045730ee0"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139207.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139207","state":"PUBLISHED","datePublished":"2026-11-30T13:32:34.217Z","dateUpdated":"2026-11-30T13:32:34.217Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.920Z"},"containers":{"cna":{"title":"net/mlx5e: IPsec, Fix out-of-bounds comparison of neighbour keys","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5e: IPsec, Fix out-of-bounds comparison of neighbour keys\n\nmlx5e_ipsec_netevent_event() keeps the L2 headers of offloaded tunnel\nmode SAs up to date: on every neighbour change it looks for SAs whose\nendpoint matches the neighbour's address. The compare width, 4 bytes for\nIPv4 or 16 for IPv6, is chosen from the SA's address family, with no\ncheck that the neighbour is of the same family.\n\nAn ARP entry only stores a 4-byte key, so with an IPv6 tunnel mode SA\noffloaded, any IPv4 neighbour update in the system is compared as if it\nwere a 16-byte IPv6 address, reading past the end of the object:\n\n  BUG: KASAN: slab-out-of-bounds in mlx5e_ipsec_netevent_event+0x736/0x8d0 [mlx5_core]\n  Read of size 4 at addr ff110001260a4ad8 by task swapper/8/0\n  Call Trace:\n   <IRQ>\n   mlx5e_ipsec_netevent_event+0x736/0x8d0 [mlx5_core]\n   notifier_call_chain+0x97/0x2b0\n   atomic_notifier_call_chain+0x5d/0x130\n   neigh_timer_handler+0x35c/0x1140\n   call_timer_fn+0x164/0x490\n   __run_timers+0x5b9/0x960\n   run_timer_softirq+0xf0/0x1d0\n   handle_softirqs+0x189/0x8a0\n   __irq_exit_rcu+0x10d/0x250\n   ...\n\n  Allocated by task 1015:\n   __kmalloc_noprof+0x2e6/0x8b0\n   ___neigh_create+0xcc9/0x24c0\n   ip_finish_output2+0xfc7/0x1e80\n   ip_output+0x172/0x3b0\n   ip_send_skb+0xa5/0x1b0\n   udp_send_skb+0x852/0x10f0\n   udp_sendmsg+0x1333/0x2150\n   ...\n\nThe opposite mix (IPv4 SA with IPv6 neighbour) stays in bounds, but only\nthe first 32 bits of the IPv6 address are compared, so an unrelated\nneighbour can match.\n\nSkip neighbours whose address family doesn't match the SA."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"86d331636b6bf543ad9cdf4953f49101d5b73f8b","versionType":"git"},{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"8048922f22665406ed9279dd5cc38ead9c30e48b","versionType":"git"},{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"aeb02b5806d30a66d081271b41176c4f0d654540","versionType":"git"},{"version":"4c24272b4e2befca6ad1409c3c9aaa16c24b1099","status":"affected","lessThan":"520631554a689d2cd52452578f3140f045730ee0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.4","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.4","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/86d331636b6bf543ad9cdf4953f49101d5b73f8b"},{"url":"https://git.kernel.org/stable/c/8048922f22665406ed9279dd5cc38ead9c30e48b"},{"url":"https://git.kernel.org/stable/c/aeb02b5806d30a66d081271b41176c4f0d654540"},{"url":"https://git.kernel.org/stable/c/520631554a689d2cd52452578f3140f045730ee0"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:34.217Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.4","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}