{"id":"CVE-2026-98807","state":"PUBLISHED","title":"net/mlx5: Fix slab-out-of-bounds when handling team device events","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix slab-out-of-bounds when handling team device events\n\nThe mlx5_handle_changeupper_event() and mlx5_handle_changeinfodata_event()\nfunctions check for LAG masters (which includes both bonding and team\ndevices) but only call bonding-specific APIs. When processing team device\nevents, calling bond_slave_get_rcu() and bond_is_slave_inactive() on\nteam_port structures causes KASAN to detect an out-of-bounds memory access\nsince team_port is smaller than bond slave.\n\nFix this by wrapping the bond-specific API calls with a check for bonding\ndevices. This allows the function to still process LAG events for both\nbonding and teams but only calls bond-specific functions when dealing with\nactual bonding devices.\n\nFor mlx5_handle_changeinfodata_event(), keep the explicit bond check as\nmlx5 doesn't handle state information for team ports anyway.\n\nTested with Mellanox ConnectX-5 on Linux 7.2.0-rc6:\n- Bonding: PASS (no regressions)\n- Team device: PASS (no KASAN errors)","publishedAt":"2026-10-18T15:48:53.992Z","updatedAt":"2026-10-19T09:26:00.670Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"16ca0e79f31ea810346a79dda545ba344ede1d47","versionType":"git"},{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"3a6e67ff267af2053a793825c3b7844741fed461","versionType":"git"},{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"8117cbc504cb01980258d8a8c9be8f57cf0aaceb","versionType":"git"},{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"04c824940d52871c49866a4ac67b504146f7cf35","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.12.113","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.56","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.10","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","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/lag/lag.c"]}],"references":["https://git.kernel.org/stable/c/16ca0e79f31ea810346a79dda545ba344ede1d47","https://git.kernel.org/stable/c/3a6e67ff267af2053a793825c3b7844741fed461","https://git.kernel.org/stable/c/8117cbc504cb01980258d8a8c9be8f57cf0aaceb","https://git.kernel.org/stable/c/04c824940d52871c49866a4ac67b504146f7cf35"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/98xxx/CVE-2026-98807.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-98807","state":"PUBLISHED","datePublished":"2026-10-18T15:48:53.992Z","dateUpdated":"2026-10-19T09:26:00.670Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-09-25T10:25:14.371Z"},"containers":{"cna":{"title":"net/mlx5: Fix slab-out-of-bounds when handling team device events","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/mlx5: Fix slab-out-of-bounds when handling team device events\n\nThe mlx5_handle_changeupper_event() and mlx5_handle_changeinfodata_event()\nfunctions check for LAG masters (which includes both bonding and team\ndevices) but only call bonding-specific APIs. When processing team device\nevents, calling bond_slave_get_rcu() and bond_is_slave_inactive() on\nteam_port structures causes KASAN to detect an out-of-bounds memory access\nsince team_port is smaller than bond slave.\n\nFix this by wrapping the bond-specific API calls with a check for bonding\ndevices. This allows the function to still process LAG events for both\nbonding and teams but only calls bond-specific functions when dealing with\nactual bonding devices.\n\nFor mlx5_handle_changeinfodata_event(), keep the explicit bond check as\nmlx5 doesn't handle state information for team ports anyway.\n\nTested with Mellanox ConnectX-5 on Linux 7.2.0-rc6:\n- Bonding: PASS (no regressions)\n- Team device: PASS (no KASAN errors)"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"16ca0e79f31ea810346a79dda545ba344ede1d47","versionType":"git"},{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"3a6e67ff267af2053a793825c3b7844741fed461","versionType":"git"},{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"8117cbc504cb01980258d8a8c9be8f57cf0aaceb","versionType":"git"},{"version":"54493a08e21f46446b3b24577c5a6f229d049757","status":"affected","lessThan":"04c824940d52871c49866a4ac67b504146f7cf35","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.18","versionType":"semver"},{"version":"6.12.113","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.56","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.2.10","status":"unaffected","lessThanOrEqual":"7.2.*","versionType":"semver"},{"version":"7.3","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/lag/lag.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/16ca0e79f31ea810346a79dda545ba344ede1d47"},{"url":"https://git.kernel.org/stable/c/3a6e67ff267af2053a793825c3b7844741fed461"},{"url":"https://git.kernel.org/stable/c/8117cbc504cb01980258d8a8c9be8f57cf0aaceb"},{"url":"https://git.kernel.org/stable/c/04c824940d52871c49866a4ac67b504146f7cf35"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-19T09:26:00.670Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.12.113"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"6.18.56"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"7.2.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.18","versionEndExcluding":"7.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}