Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
128
Star
73
Fork
329
src-openEuler
/
kernel
Closed
Code
Issues
1197
Pull Requests
35
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
CVE-2024-57974
Doing
#IBXZYX
CVE和安全问题
liujian
Opened this issue
2025-04-01 16:19
一、漏洞信息 漏洞编号:[CVE-2024-57974](https://nvd.nist.gov/vuln/detail/CVE-2024-57974) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.19,6.1.8,6.4.0,6.6.0 CVSS V3.0分值: BaseScore:4.7 Medium Vector:CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:udp: Deal with race between UDP socket address change and rehashIf a UDP socket changes its local address while it s receivingdatagrams, as a result of connect(), there is a period during whicha lookup operation might fail to find it, after the address is changedbut before the secondary hash (port and address) and the four-tuplehash (local and remote ports and addresses) are updated.Secondary hash chains were introduced by commit 30fff9231fad ( udp:bind() optimisation ) and, as a result, a rehash operation becameneeded to make a bound socket reachable again after a connect().This operation was introduced by commit 719f835853a9 ( udp: addrehash on connect() ) which isn t however a complete fix: thesocket will be found once the rehashing completes, but not whileit s pending.This is noticeable with a socat(1) server in UDP4-LISTEN mode, and aclient sending datagrams to it. After the server receives the firstdatagram (cf. _xioopen_ipdgram_listen()), it issues a connect() tothe address of the sender, in order to set up a directed flow.Now, if the client, running on a different CPU thread, happens tosend a (subsequent) datagram while the server s socket changes itsaddress, but is not rehashed yet, this will result in a failedlookup and a port unreachable error delivered to the client, asapparent from the following reproducer: LEN=$(($(cat /proc/sys/net/core/wmem_default) / 4)) dd if=/dev/urandom bs=1 count=${LEN} of=tmp.in while :; do taskset -c 1 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.1 || sleep 1 taskset -c 2 socat OPEN:tmp.in UDP4:localhost:1337,shut-null wait donewhere the client will eventually get ECONNREFUSED on a write()(typically the second or third one of a given iteration): 2024/11/13 21:28:23 socat[46901] E write(6, 0x556db2e3c000, 8192): Connection refusedThis issue was first observed as a seldom failure in Podman s testschecking UDP functionality while using pasta(1) to connect thecontainer s network namespace, which leads us to a reproducer withthe lookup error resulting in an ICMP packet on a tap device: LOCAL_ADDR= $(ip -j -4 addr show|jq -rM .[] | .addr_info[0] | select(.scope == global ).local ) while :; do ./pasta --config-net -p pasta.pcap -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.2 || sleep 1 socat OPEN:tmp.in UDP4:${LOCAL_ADDR}:1337,shut-null wait cmp tmp.in tmp.out doneOnce this fails: tmp.in tmp.out differ: char 8193, line 29we can finally have a look at what s going on: $ tshark -r pasta.pcap 1 0.000000 :: ? ff02::16 ICMPv6 110 Multicast Listener Report Message v2 2 0.168690 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 3 0.168767 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 4 0.168806 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 5 0.168827 c6:47:05:8d:dc:04 ? Broadcast ARP 42 Who has 88.198.0.161? Tell 88.198.0.164 6 0.168851 9a:55:9a:55:9a:55 ? c6:47:05:8d:dc:04 ARP 42 88.198.0.161 is at 9a:55:9a:55:9a:55 7 0.168875 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 8 0.168896 88.198.0.164 ? 88.198.0.161 ICMP 590 Destination unreachable (Port unreachable) 9 0.168926 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 10 0.168959 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 11 0.168989 88.198.0.161 ? 88.198.0.164 UDP 4138 60260 ? 1337 Len=4096 12 0.169010 88.198.0.161 ? 88.198.0.164 UDP 42 60260 ? 1337 Len=0On the third datagram received, the network namespace of the containerinitiates an ARP lookup to deliver the ICMP message.In another variant of this reproducer, starting the client with: strace -f pasta --config-net -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,tru---truncated--- 漏洞公开时间:2025-02-27 10:15:10 漏洞创建时间:2025-04-01 16:19:22 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2024-57974 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/4f8344fce91c5766d368edb0ad80142eacd805c7 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90c | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/d65d3bf309b2649d27b24efd0d8784da2d81f2a6 | | | suse_bugzilla | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-57974 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://www.cve.org/CVERecord?id=CVE-2024-57974 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/stable/c/4f8344fce91c5766d368edb0ad80142eacd805c7 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/stable/c/a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90c | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/stable/c/d65d3bf309b2649d27b24efd0d8784da2d81f2a6 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-57974.mbox | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://bugzilla.redhat.com/show_bug.cgi?id=2348512 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | debian | | https://security-tracker.debian.org/tracker/CVE-2024-57974 | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: openBrain开源漏洞感知系统 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> | 影响的包 | 修复版本 | 修复补丁 | 问题引入补丁 | 来源 | | ------- | -------- | ------- | -------- | --------- | | linux_kernel | 6.12.13 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4f8344fce91c5766d368edb0ad80142eacd805c7Issue | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=30fff9231fad757c061285e347b33c5149c2c2e4 | linuxkernelcves | | linux_kernel | 6.13.2 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d65d3bf309b2649d27b24efd0d8784da2d81f2a6Issue | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=30fff9231fad757c061285e347b33c5149c2c2e4 | linuxkernelcves | | linux_kernel | 6.14-rc1 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90cPlease | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=30fff9231fad757c061285e347b33c5149c2c2e4 | linuxkernelcves | </details> 二、漏洞分析结构反馈 影响性分析说明: In the Linux kernel, the following vulnerability has been resolved:udp: Deal with race between UDP socket address change and rehashIf a UDP socket changes its local address while it s receivingdatagrams, as a result of connect(), there is a period during whicha lookup operation might fail to find it, after the address is changedbut before the secondary hash (port and address) and the four-tuplehash (local and remote ports and addresses) are updated.Secondary hash chains were introduced by commit 30fff9231fad ( udp:bind() optimisation ) and, as a result, a rehash operation becameneeded to make a bound socket reachable again after a connect().This operation was introduced by commit 719f835853a9 ( udp: addrehash on connect() ) which isn t however a complete fix: thesocket will be found once the rehashing completes, but not whileit s pending.This is noticeable with a socat(1) server in UDP4-LISTEN mode, and aclient sending datagrams to it. After the server receives the firstdatagram (cf. _xioopen_ipdgram_listen()), it issues a connect() tothe address of the sender, in order to set up a directed flow.Now, if the client, running on a different CPU thread, happens tosend a (subsequent) datagram while the server s socket changes itsaddress, but is not rehashed yet, this will result in a failedlookup and a port unreachable error delivered to the client, asapparent from the following reproducer: LEN=$(($(cat /proc/sys/net/core/wmem_default) / 4)) dd if=/dev/urandom bs=1 count=${LEN} of=tmp.in while :; do taskset -c 1 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.1 || sleep 1 taskset -c 2 socat OPEN:tmp.in UDP4:localhost:1337,shut-null wait donewhere the client will eventually get ECONNREFUSED on a write()(typically the second or third one of a given iteration): 2024/11/13 21:28:23 socat[46901] E write(6, 0x556db2e3c000, 8192): Connection refusedThis issue was first observed as a seldom failure in Podman s testschecking UDP functionality while using pasta(1) to connect thecontainer s network namespace, which leads us to a reproducer withthe lookup error resulting in an ICMP packet on a tap device: LOCAL_ADDR= $(ip -j -4 addr show|jq -rM .[] | .addr_info[0] | select(.scope == global ).local ) while :; do ./pasta --config-net -p pasta.pcap -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.2 || sleep 1 socat OPEN:tmp.in UDP4:${LOCAL_ADDR}:1337,shut-null wait cmp tmp.in tmp.out doneOnce this fails: tmp.in tmp.out differ: char 8193, line 29we can finally have a look at what s going on: $ tshark -r pasta.pcap 1 0.000000 :: ? ff02::16 ICMPv6 110 Multicast Listener Report Message v2 2 0.168690 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 3 0.168767 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 4 0.168806 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 5 0.168827 c6:47:05:8d:dc:04 ? Broadcast ARP 42 Who has 88.198.0.161? Tell 88.198.0.164 6 0.168851 9a:55:9a:55:9a:55 ? c6:47:05:8d:dc:04 ARP 42 88.198.0.161 is at 9a:55:9a:55:9a:55 7 0.168875 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 8 0.168896 88.198.0.164 ? 88.198.0.161 ICMP 590 Destination unreachable (Port unreachable) 9 0.168926 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 10 0.168959 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 11 0.168989 88.198.0.161 ? 88.198.0.164 UDP 4138 60260 ? 1337 Len=4096 12 0.169010 88.198.0.161 ? 88.198.0.164 UDP 42 60260 ? 1337 Len=0On the third datagram received, the network namespace of the containerinitiates an ARP lookup to deliver the ICMP message.In another variant of this reproducer, starting the client with: strace -f pasta --config-net -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,tru---truncated--- openEuler评分: 5.5 Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 受影响版本排查(受影响/不受影响): 1.openEuler-20.03-LTS-SP4(4.19.90):受影响 2.openEuler-22.03-LTS-SP3(5.10.0):受影响 3.openEuler-22.03-LTS-SP4(5.10.0):受影响 4.openEuler-24.03-LTS:受影响 5.openEuler-24.03-LTS-SP1:受影响 6.openEuler-24.03-LTS-SP2:受影响 7.master(6.12.33):不受影响 8.openEuler-24.03-LTS-Next:不受影响 修复是否涉及abi变化(是/否): 1.openEuler-20.03-LTS-SP4(4.19.90):否 2.openEuler-22.03-LTS-SP3(5.10.0):否 3.master(6.12.33):否 4.openEuler-24.03-LTS:否 5.openEuler-24.03-LTS-Next:否 6.openEuler-22.03-LTS-SP4(5.10.0):否 7.openEuler-24.03-LTS-SP1:否 8.openEuler-24.03-LTS-SP2:否 原因说明: 1.openEuler-24.03-LTS:正常修复 2.openEuler-24.03-LTS-SP1:正常修复 3.openEuler-24.03-LTS-SP2:正常修复 4.openEuler-20.03-LTS-SP4(4.19.90):不修复-超出修复范围 5.openEuler-22.03-LTS-SP3(5.10.0):不修复-超出修复范围 6.openEuler-22.03-LTS-SP4(5.10.0):不修复-超出修复范围 7.master(6.12.33):不受影响-漏洞代码不能被攻击者触发 8.openEuler-24.03-LTS-Next:不受影响-漏洞代码不能被攻击者触发
一、漏洞信息 漏洞编号:[CVE-2024-57974](https://nvd.nist.gov/vuln/detail/CVE-2024-57974) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.19,6.1.8,6.4.0,6.6.0 CVSS V3.0分值: BaseScore:4.7 Medium Vector:CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:udp: Deal with race between UDP socket address change and rehashIf a UDP socket changes its local address while it s receivingdatagrams, as a result of connect(), there is a period during whicha lookup operation might fail to find it, after the address is changedbut before the secondary hash (port and address) and the four-tuplehash (local and remote ports and addresses) are updated.Secondary hash chains were introduced by commit 30fff9231fad ( udp:bind() optimisation ) and, as a result, a rehash operation becameneeded to make a bound socket reachable again after a connect().This operation was introduced by commit 719f835853a9 ( udp: addrehash on connect() ) which isn t however a complete fix: thesocket will be found once the rehashing completes, but not whileit s pending.This is noticeable with a socat(1) server in UDP4-LISTEN mode, and aclient sending datagrams to it. After the server receives the firstdatagram (cf. _xioopen_ipdgram_listen()), it issues a connect() tothe address of the sender, in order to set up a directed flow.Now, if the client, running on a different CPU thread, happens tosend a (subsequent) datagram while the server s socket changes itsaddress, but is not rehashed yet, this will result in a failedlookup and a port unreachable error delivered to the client, asapparent from the following reproducer: LEN=$(($(cat /proc/sys/net/core/wmem_default) / 4)) dd if=/dev/urandom bs=1 count=${LEN} of=tmp.in while :; do taskset -c 1 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.1 || sleep 1 taskset -c 2 socat OPEN:tmp.in UDP4:localhost:1337,shut-null wait donewhere the client will eventually get ECONNREFUSED on a write()(typically the second or third one of a given iteration): 2024/11/13 21:28:23 socat[46901] E write(6, 0x556db2e3c000, 8192): Connection refusedThis issue was first observed as a seldom failure in Podman s testschecking UDP functionality while using pasta(1) to connect thecontainer s network namespace, which leads us to a reproducer withthe lookup error resulting in an ICMP packet on a tap device: LOCAL_ADDR= $(ip -j -4 addr show|jq -rM .[] | .addr_info[0] | select(.scope == global ).local ) while :; do ./pasta --config-net -p pasta.pcap -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.2 || sleep 1 socat OPEN:tmp.in UDP4:${LOCAL_ADDR}:1337,shut-null wait cmp tmp.in tmp.out doneOnce this fails: tmp.in tmp.out differ: char 8193, line 29we can finally have a look at what s going on: $ tshark -r pasta.pcap 1 0.000000 :: ? ff02::16 ICMPv6 110 Multicast Listener Report Message v2 2 0.168690 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 3 0.168767 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 4 0.168806 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 5 0.168827 c6:47:05:8d:dc:04 ? Broadcast ARP 42 Who has 88.198.0.161? Tell 88.198.0.164 6 0.168851 9a:55:9a:55:9a:55 ? c6:47:05:8d:dc:04 ARP 42 88.198.0.161 is at 9a:55:9a:55:9a:55 7 0.168875 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 8 0.168896 88.198.0.164 ? 88.198.0.161 ICMP 590 Destination unreachable (Port unreachable) 9 0.168926 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 10 0.168959 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 11 0.168989 88.198.0.161 ? 88.198.0.164 UDP 4138 60260 ? 1337 Len=4096 12 0.169010 88.198.0.161 ? 88.198.0.164 UDP 42 60260 ? 1337 Len=0On the third datagram received, the network namespace of the containerinitiates an ARP lookup to deliver the ICMP message.In another variant of this reproducer, starting the client with: strace -f pasta --config-net -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,tru---truncated--- 漏洞公开时间:2025-02-27 10:15:10 漏洞创建时间:2025-04-01 16:19:22 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2024-57974 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/4f8344fce91c5766d368edb0ad80142eacd805c7 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90c | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/d65d3bf309b2649d27b24efd0d8784da2d81f2a6 | | | suse_bugzilla | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-57974 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://www.cve.org/CVERecord?id=CVE-2024-57974 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/stable/c/4f8344fce91c5766d368edb0ad80142eacd805c7 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/stable/c/a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90c | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/stable/c/d65d3bf309b2649d27b24efd0d8784da2d81f2a6 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-57974.mbox | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | suse_bugzilla | https://bugzilla.redhat.com/show_bug.cgi?id=2348512 | https://bugzilla.suse.com/show_bug.cgi?id=1238532 | | debian | | https://security-tracker.debian.org/tracker/CVE-2024-57974 | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: openBrain开源漏洞感知系统 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> | 影响的包 | 修复版本 | 修复补丁 | 问题引入补丁 | 来源 | | ------- | -------- | ------- | -------- | --------- | | linux_kernel | 6.12.13 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4f8344fce91c5766d368edb0ad80142eacd805c7Issue | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=30fff9231fad757c061285e347b33c5149c2c2e4 | linuxkernelcves | | linux_kernel | 6.13.2 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d65d3bf309b2649d27b24efd0d8784da2d81f2a6Issue | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=30fff9231fad757c061285e347b33c5149c2c2e4 | linuxkernelcves | | linux_kernel | 6.14-rc1 | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a502ea6fa94b1f7be72a24bcf9e3f5f6b7e6e90cPlease | https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=30fff9231fad757c061285e347b33c5149c2c2e4 | linuxkernelcves | </details> 二、漏洞分析结构反馈 影响性分析说明: In the Linux kernel, the following vulnerability has been resolved:udp: Deal with race between UDP socket address change and rehashIf a UDP socket changes its local address while it s receivingdatagrams, as a result of connect(), there is a period during whicha lookup operation might fail to find it, after the address is changedbut before the secondary hash (port and address) and the four-tuplehash (local and remote ports and addresses) are updated.Secondary hash chains were introduced by commit 30fff9231fad ( udp:bind() optimisation ) and, as a result, a rehash operation becameneeded to make a bound socket reachable again after a connect().This operation was introduced by commit 719f835853a9 ( udp: addrehash on connect() ) which isn t however a complete fix: thesocket will be found once the rehashing completes, but not whileit s pending.This is noticeable with a socat(1) server in UDP4-LISTEN mode, and aclient sending datagrams to it. After the server receives the firstdatagram (cf. _xioopen_ipdgram_listen()), it issues a connect() tothe address of the sender, in order to set up a directed flow.Now, if the client, running on a different CPU thread, happens tosend a (subsequent) datagram while the server s socket changes itsaddress, but is not rehashed yet, this will result in a failedlookup and a port unreachable error delivered to the client, asapparent from the following reproducer: LEN=$(($(cat /proc/sys/net/core/wmem_default) / 4)) dd if=/dev/urandom bs=1 count=${LEN} of=tmp.in while :; do taskset -c 1 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.1 || sleep 1 taskset -c 2 socat OPEN:tmp.in UDP4:localhost:1337,shut-null wait donewhere the client will eventually get ECONNREFUSED on a write()(typically the second or third one of a given iteration): 2024/11/13 21:28:23 socat[46901] E write(6, 0x556db2e3c000, 8192): Connection refusedThis issue was first observed as a seldom failure in Podman s testschecking UDP functionality while using pasta(1) to connect thecontainer s network namespace, which leads us to a reproducer withthe lookup error resulting in an ICMP packet on a tap device: LOCAL_ADDR= $(ip -j -4 addr show|jq -rM .[] | .addr_info[0] | select(.scope == global ).local ) while :; do ./pasta --config-net -p pasta.pcap -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,trunc & sleep 0.2 || sleep 1 socat OPEN:tmp.in UDP4:${LOCAL_ADDR}:1337,shut-null wait cmp tmp.in tmp.out doneOnce this fails: tmp.in tmp.out differ: char 8193, line 29we can finally have a look at what s going on: $ tshark -r pasta.pcap 1 0.000000 :: ? ff02::16 ICMPv6 110 Multicast Listener Report Message v2 2 0.168690 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 3 0.168767 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 4 0.168806 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 5 0.168827 c6:47:05:8d:dc:04 ? Broadcast ARP 42 Who has 88.198.0.161? Tell 88.198.0.164 6 0.168851 9a:55:9a:55:9a:55 ? c6:47:05:8d:dc:04 ARP 42 88.198.0.161 is at 9a:55:9a:55:9a:55 7 0.168875 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 8 0.168896 88.198.0.164 ? 88.198.0.161 ICMP 590 Destination unreachable (Port unreachable) 9 0.168926 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 10 0.168959 88.198.0.161 ? 88.198.0.164 UDP 8234 60260 ? 1337 Len=8192 11 0.168989 88.198.0.161 ? 88.198.0.164 UDP 4138 60260 ? 1337 Len=4096 12 0.169010 88.198.0.161 ? 88.198.0.164 UDP 42 60260 ? 1337 Len=0On the third datagram received, the network namespace of the containerinitiates an ARP lookup to deliver the ICMP message.In another variant of this reproducer, starting the client with: strace -f pasta --config-net -u 1337 socat UDP4-LISTEN:1337,null-eof OPEN:tmp.out,create,tru---truncated--- openEuler评分: 5.5 Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 受影响版本排查(受影响/不受影响): 1.openEuler-20.03-LTS-SP4(4.19.90):受影响 2.openEuler-22.03-LTS-SP3(5.10.0):受影响 3.openEuler-22.03-LTS-SP4(5.10.0):受影响 4.openEuler-24.03-LTS:受影响 5.openEuler-24.03-LTS-SP1:受影响 6.openEuler-24.03-LTS-SP2:受影响 7.master(6.12.33):不受影响 8.openEuler-24.03-LTS-Next:不受影响 修复是否涉及abi变化(是/否): 1.openEuler-20.03-LTS-SP4(4.19.90):否 2.openEuler-22.03-LTS-SP3(5.10.0):否 3.master(6.12.33):否 4.openEuler-24.03-LTS:否 5.openEuler-24.03-LTS-Next:否 6.openEuler-22.03-LTS-SP4(5.10.0):否 7.openEuler-24.03-LTS-SP1:否 8.openEuler-24.03-LTS-SP2:否 原因说明: 1.openEuler-24.03-LTS:正常修复 2.openEuler-24.03-LTS-SP1:正常修复 3.openEuler-24.03-LTS-SP2:正常修复 4.openEuler-20.03-LTS-SP4(4.19.90):不修复-超出修复范围 5.openEuler-22.03-LTS-SP3(5.10.0):不修复-超出修复范围 6.openEuler-22.03-LTS-SP4(5.10.0):不修复-超出修复范围 7.master(6.12.33):不受影响-漏洞代码不能被攻击者触发 8.openEuler-24.03-LTS-Next:不受影响-漏洞代码不能被攻击者触发
Comments (
10
)
Sign in
to comment
Status
Doing
Backlog
已挂起
Doing
Done
Declined
Assignees
Not set
CTC-Xibo.Wang
CTC-XiboWang
Assignee
Collaborator
+Assign
+Mention
Labels
sig/Kernel
CVE/UNFIXED
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(4)
1
https://gitee.com/src-openeuler/kernel.git
git@gitee.com:src-openeuler/kernel.git
src-openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register