CVE-2022-49195
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
26/02/2025
Last modified:
23/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net: dsa: fix panic on shutdown if multi-chip tree failed to probe<br />
<br />
DSA probing is atypical because a tree of devices must probe all at<br />
once, so out of N switches which call dsa_tree_setup_routing_table()<br />
during probe, for (N - 1) of them, "complete" will return false and they<br />
will exit probing early. The Nth switch will set up the whole tree on<br />
their behalf.<br />
<br />
The implication is that for (N - 1) switches, the driver binds to the<br />
device successfully, without doing anything. When the driver is bound,<br />
the ->shutdown() method may run. But if the Nth switch has failed to<br />
initialize the tree, there is nothing to do for the (N - 1) driver<br />
instances, since the slave devices have not been created, etc. Moreover,<br />
dsa_switch_shutdown() expects that the calling @ds has been in fact<br />
initialized, so it jumps at dereferencing the various data structures,<br />
which is incorrect.<br />
<br />
Avoid the ensuing NULL pointer dereferences by simply checking whether<br />
the Nth switch has previously set "ds->setup = true" for the switch<br />
which is currently shutting down. The entire setup is serialized under<br />
dsa2_mutex which we already hold.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.1 (including) | 5.15.33 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.16.19 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.17 (including) | 5.17.2 (excluding) |
| cpe:2.3:o:linux:linux_kernel:5.15:-:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc4:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc5:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc6:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:5.15:rc7:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



