Bug 1222367 (CVE-2024-26723)

Summary: VUL-0: CVE-2024-26723: kernel: lan966x: Fix crash when adding interface under a lag
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P5 - None CC: gianluca.gabrielli
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/400193/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-26723:5.5:(AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-04-05 09:36:14 UTC
In the Linux kernel, the following vulnerability has been resolved:

lan966x: Fix crash when adding interface under a lag

There is a crash when adding one of the lan966x interfaces under a lag
interface. The issue can be reproduced like this:
ip link add name bond0 type bond miimon 100 mode balance-xor
ip link set dev eth0 master bond0

The reason is because when adding a interface under the lag it would go
through all the ports and try to figure out which other ports are under
that lag interface. And the issue is that lan966x can have ports that are
NULL pointer as they are not probed. So then iterating over these ports
it would just crash as they are NULL pointers.
The fix consists in actually checking for NULL pointers before accessing
something from the ports. Like we do in other places.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-26723
https://www.cve.org/CVERecord?id=CVE-2024-26723
https://git.kernel.org/stable/c/15faa1f67ab405d47789d4702f587ec7df7ef03e
https://git.kernel.org/stable/c/2a492f01228b7d091dfe38974ef40dccf8f9f2f1
https://git.kernel.org/stable/c/48fae67d837488c87379f0c9f27df7391718477c
https://git.kernel.org/stable/c/b9357489c46c7a43999964628db8b47d3a1f8672
https://bugzilla.redhat.com/show_bug.cgi?id=2273135