CVE-2023-52574
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
02/03/2024
Last modified:
11/12/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
team: fix null-ptr-deref when team device type is changed<br />
<br />
Get a null-ptr-deref bug as follows with reproducer [1].<br />
<br />
BUG: kernel NULL pointer dereference, address: 0000000000000228<br />
...<br />
RIP: 0010:vlan_dev_hard_header+0x35/0x140 [8021q]<br />
...<br />
Call Trace:<br />
<br />
? __die+0x24/0x70<br />
? page_fault_oops+0x82/0x150<br />
? exc_page_fault+0x69/0x150<br />
? asm_exc_page_fault+0x26/0x30<br />
? vlan_dev_hard_header+0x35/0x140 [8021q]<br />
? vlan_dev_hard_header+0x8e/0x140 [8021q]<br />
neigh_connected_output+0xb2/0x100<br />
ip6_finish_output2+0x1cb/0x520<br />
? nf_hook_slow+0x43/0xc0<br />
? ip6_mtu+0x46/0x80<br />
ip6_finish_output+0x2a/0xb0<br />
mld_sendpack+0x18f/0x250<br />
mld_ifc_work+0x39/0x160<br />
process_one_work+0x1e6/0x3f0<br />
worker_thread+0x4d/0x2f0<br />
? __pfx_worker_thread+0x10/0x10<br />
kthread+0xe5/0x120<br />
? __pfx_kthread+0x10/0x10<br />
ret_from_fork+0x34/0x50<br />
? __pfx_kthread+0x10/0x10<br />
ret_from_fork_asm+0x1b/0x30<br />
<br />
[1]<br />
$ teamd -t team0 -d -c &#39;{"runner": {"name": "loadbalance"}}&#39;<br />
$ ip link add name t-dummy type dummy<br />
$ ip link add link t-dummy name t-dummy.100 type vlan id 100<br />
$ ip link add name t-nlmon type nlmon<br />
$ ip link set t-nlmon master team0<br />
$ ip link set t-nlmon nomaster<br />
$ ip link set t-dummy up<br />
$ ip link set team0 up<br />
$ ip link set t-dummy.100 down<br />
$ ip link set t-dummy.100 master team0<br />
<br />
When enslave a vlan device to team device and team device type is changed<br />
from non-ether to ether, header_ops of team device is changed to<br />
vlan_header_ops. That is incorrect and will trigger null-ptr-deref<br />
for vlan->real_dev in vlan_dev_hard_header() because team device is not<br />
a vlan device.<br />
<br />
Cache eth_header_ops in team_setup(), then assign cached header_ops to<br />
header_ops of team net device when its type is changed from non-ether<br />
to ether to fix the bug.
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:*:*:*:*:*:*:*:* | 3.7 (including) | 4.14.327 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.15 (including) | 4.19.296 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.20 (including) | 5.4.258 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.198 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.134 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.56 (excluding) |
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.5.6 (excluding) |
cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:* | ||
cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/1779eb51b9cc628cee551f252701a85a2a50a457
- https://git.kernel.org/stable/c/2f0acb0736ecc3eb85dc80ad2790d634dcb10b58
- https://git.kernel.org/stable/c/492032760127251e5540a5716a70996bacf2a3fd
- https://git.kernel.org/stable/c/a7fb47b9711101d2405b0eb1276fb1f9b9b270c7
- https://git.kernel.org/stable/c/b44dd92e2afd89eb6e9d27616858e72a67bdc1a7
- https://git.kernel.org/stable/c/c5f6478686bb45f453031594ae19b6c9723a780d
- https://git.kernel.org/stable/c/cac50d9f5d876be32cb9aa21c74018468900284d
- https://git.kernel.org/stable/c/cd05eec2ee0cc396813a32ef675634e403748255
- https://git.kernel.org/stable/c/1779eb51b9cc628cee551f252701a85a2a50a457
- https://git.kernel.org/stable/c/2f0acb0736ecc3eb85dc80ad2790d634dcb10b58
- https://git.kernel.org/stable/c/492032760127251e5540a5716a70996bacf2a3fd
- https://git.kernel.org/stable/c/a7fb47b9711101d2405b0eb1276fb1f9b9b270c7
- https://git.kernel.org/stable/c/b44dd92e2afd89eb6e9d27616858e72a67bdc1a7
- https://git.kernel.org/stable/c/c5f6478686bb45f453031594ae19b6c9723a780d
- https://git.kernel.org/stable/c/cac50d9f5d876be32cb9aa21c74018468900284d
- https://git.kernel.org/stable/c/cd05eec2ee0cc396813a32ef675634e403748255