CVE-2023-52906
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/08/2024
Last modified:
13/09/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
net/sched: act_mpls: Fix warning during failed attribute validation<br />
<br />
The &#39;TCA_MPLS_LABEL&#39; attribute is of &#39;NLA_U32&#39; type, but has a<br />
validation type of &#39;NLA_VALIDATE_FUNCTION&#39;. This is an invalid<br />
combination according to the comment above &#39;struct nla_policy&#39;:<br />
<br />
"<br />
Meaning of `validate&#39; field, use via NLA_POLICY_VALIDATE_FN:<br />
NLA_BINARY Validation function called for the attribute.<br />
All other Unused - but note that it&#39;s a union<br />
"<br />
<br />
This can trigger the warning [1] in nla_get_range_unsigned() when<br />
validation of the attribute fails. Despite being of &#39;NLA_U32&#39; type, the<br />
associated &#39;min&#39;/&#39;max&#39; fields in the policy are negative as they are<br />
aliased by the &#39;validate&#39; field.<br />
<br />
Fix by changing the attribute type to &#39;NLA_BINARY&#39; which is consistent<br />
with the above comment and all other users of NLA_POLICY_VALIDATE_FN().<br />
As a result, move the length validation to the validation function.<br />
<br />
No regressions in MPLS tests:<br />
<br />
# ./tdc.py -f tc-tests/actions/mpls.json<br />
[...]<br />
# echo $?<br />
0<br />
<br />
[1]<br />
WARNING: CPU: 0 PID: 17743 at lib/nlattr.c:118<br />
nla_get_range_unsigned+0x1d8/0x1e0 lib/nlattr.c:117<br />
Modules linked in:<br />
CPU: 0 PID: 17743 Comm: syz-executor.0 Not tainted 6.1.0-rc8 #3<br />
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS<br />
rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014<br />
RIP: 0010:nla_get_range_unsigned+0x1d8/0x1e0 lib/nlattr.c:117<br />
[...]<br />
Call Trace:<br />
<br />
__netlink_policy_dump_write_attr+0x23d/0x990 net/netlink/policy.c:310<br />
netlink_policy_dump_write_attr+0x22/0x30 net/netlink/policy.c:411<br />
netlink_ack_tlv_fill net/netlink/af_netlink.c:2454 [inline]<br />
netlink_ack+0x546/0x760 net/netlink/af_netlink.c:2506<br />
netlink_rcv_skb+0x1b7/0x240 net/netlink/af_netlink.c:2546<br />
rtnetlink_rcv+0x18/0x20 net/core/rtnetlink.c:6109<br />
netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]<br />
netlink_unicast+0x5e9/0x6b0 net/netlink/af_netlink.c:1345<br />
netlink_sendmsg+0x739/0x860 net/netlink/af_netlink.c:1921<br />
sock_sendmsg_nosec net/socket.c:714 [inline]<br />
sock_sendmsg net/socket.c:734 [inline]<br />
____sys_sendmsg+0x38f/0x500 net/socket.c:2482<br />
___sys_sendmsg net/socket.c:2536 [inline]<br />
__sys_sendmsg+0x197/0x230 net/socket.c:2565<br />
__do_sys_sendmsg net/socket.c:2574 [inline]<br />
__se_sys_sendmsg net/socket.c:2572 [inline]<br />
__x64_sys_sendmsg+0x42/0x50 net/socket.c:2572<br />
do_syscall_x64 arch/x86/entry/common.c:50 [inline]<br />
do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80<br />
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.3 (including) | 5.4.229 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.164 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.89 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.7 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.2:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.2:rc3:*:*:*:*:*:* |
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/2b157c3c5d6b8ddca48d53c9e662032f65af8d61
- https://git.kernel.org/stable/c/453277feb41c2235cf2c0de9209eef962c401457
- https://git.kernel.org/stable/c/8a97b544b98e44f596219ebb290fd2ba2fd5d644
- https://git.kernel.org/stable/c/9e17f99220d111ea031b44153fdfe364b0024ff2
- https://git.kernel.org/stable/c/9e2c38827cdc6fdd3bb375c8607fc04d289756f9



