CVE-2024-56649
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
27/12/2024
Last modified:
01/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net: enetc: Do not configure preemptible TCs if SIs do not support<br />
<br />
Both ENETC PF and VF drivers share enetc_setup_tc_mqprio() to configure<br />
MQPRIO. And enetc_setup_tc_mqprio() calls enetc_change_preemptible_tcs()<br />
to configure preemptible TCs. However, only PF is able to configure<br />
preemptible TCs. Because only PF has related registers, while VF does not<br />
have these registers. So for VF, its hw->port pointer is NULL. Therefore,<br />
VF will access an invalid pointer when accessing a non-existent register,<br />
which will cause a crash issue. The simplified log is as follows.<br />
<br />
root@ls1028ardb:~# tc qdisc add dev eno0vf0 parent root handle 100: \<br />
mqprio num_tc 4 map 0 0 1 1 2 2 3 3 queues 1@0 1@1 1@2 1@3 hw 1<br />
[ 187.290775] Unable to handle kernel paging request at virtual address 0000000000001f00<br />
[ 187.424831] pc : enetc_mm_commit_preemptible_tcs+0x1c4/0x400<br />
[ 187.430518] lr : enetc_mm_commit_preemptible_tcs+0x30c/0x400<br />
[ 187.511140] Call trace:<br />
[ 187.513588] enetc_mm_commit_preemptible_tcs+0x1c4/0x400<br />
[ 187.518918] enetc_setup_tc_mqprio+0x180/0x214<br />
[ 187.523374] enetc_vf_setup_tc+0x1c/0x30<br />
[ 187.527306] mqprio_enable_offload+0x144/0x178<br />
[ 187.531766] mqprio_init+0x3ec/0x668<br />
[ 187.535351] qdisc_create+0x15c/0x488<br />
[ 187.539023] tc_modify_qdisc+0x398/0x73c<br />
[ 187.542958] rtnetlink_rcv_msg+0x128/0x378<br />
[ 187.547064] netlink_rcv_skb+0x60/0x130<br />
[ 187.550910] rtnetlink_rcv+0x18/0x24<br />
[ 187.554492] netlink_unicast+0x300/0x36c<br />
[ 187.558425] netlink_sendmsg+0x1a8/0x420<br />
[ 187.606759] ---[ end trace 0000000000000000 ]---<br />
<br />
In addition, some PFs also do not support configuring preemptible TCs,<br />
such as eno1 and eno3 on LS1028A. It won&#39;t crash like it does for VFs,<br />
but we should prevent these PFs from accessing these unimplemented<br />
registers.
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:*:*:*:*:*:*:*:* | 6.4 (including) | 6.6.66 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.12.5 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.13:rc1:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page



