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-2023-53240
Done
#ICY4HX
CVE和安全问题
openeuler-ci-bot
owner
Opened this issue
2025-09-16 00:02
一、漏洞信息 漏洞编号:[CVE-2023-53240](https://nvd.nist.gov/vuln/detail/CVE-2023-53240) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.19,6.4.0,6.6.0 CVSS V3.x分值: BaseScore:5.5 Medium Vector:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:xsk: check IFF_UP earlier in Tx pathXsk Tx can be triggered via either sendmsg() or poll() syscalls. Thesetwo paths share a call to common function xsk_xmit() which has twosanity checks within. A pseudo code example to show the two paths:__xsk_sendmsg() : xsk_poll():if (unlikely(!xsk_is_bound(xs))) if (unlikely(!xsk_is_bound(xs))) return -ENXIO; return mask;if (unlikely(need_wait)) (...) return -EOPNOTSUPP; xsk_xmit()mark napi id(...)xsk_xmit()xsk_xmit():if (unlikely(!(xs->dev->flags & IFF_UP))) return -ENETDOWN;if (unlikely(!xs->tx)) return -ENOBUFS;As it can be observed above, in sendmsg() napi id can be marked oninterface that was not brought up and this causes a NULL ptrdereference:[31757.505631] BUG: kernel NULL pointer dereference, address: 0000000000000018[31757.512710] #PF: supervisor read access in kernel mode[31757.517936] #PF: error_code(0x0000) - not-present page[31757.523149] PGD 0 P4D 0[31757.525726] Oops: 0000 [#1] PREEMPT SMP NOPTI[31757.530154] CPU: 26 PID: 95641 Comm: xdpsock Not tainted 6.2.0-rc5+ #40[31757.536871] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019[31757.547457] RIP: 0010:xsk_sendmsg+0xde/0x180[31757.551799] Code: 00 75 a2 48 8b 00 a8 04 75 9b 84 d2 74 69 8b 85 14 01 00 00 85 c0 75 1b 48 8b 85 28 03 00 00 48 8b 80 98 00 00 00 48 8b 40 20 <8b> 40 18 89 85 14 01 00 00 8b bd 14 01 00 00 81 ff 00 01 00 00 0f[31757.570840] RSP: 0018:ffffc90034f27dc0 EFLAGS: 00010246[31757.576143] RAX: 0000000000000000 RBX: ffffc90034f27e18 RCX: 0000000000000000[31757.583389] RDX: 0000000000000001 RSI: ffffc90034f27e18 RDI: ffff88984cf3c100[31757.590631] RBP: ffff88984714a800 R08: ffff88984714a800 R09: 0000000000000000[31757.597877] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fffffffa[31757.605123] R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000000[31757.612364] FS: 00007fb4c5931180(0000) GS:ffff88afdfa00000(0000) knlGS:0000000000000000[31757.620571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033[31757.626406] CR2: 0000000000000018 CR3: 000000184b41c003 CR4: 00000000007706e0[31757.633648] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000[31757.640894] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400[31757.648139] PKRU: 55555554[31757.650894] Call Trace:[31757.653385] <TASK>[31757.655524] sock_sendmsg+0x8f/0xa0[31757.659077] ? sockfd_lookup_light+0x12/0x70[31757.663416] __sys_sendto+0xfc/0x170[31757.667051] ? do_sched_setscheduler+0xdb/0x1b0[31757.671658] __x64_sys_sendto+0x20/0x30[31757.675557] do_syscall_64+0x38/0x90[31757.679197] entry_SYSCALL_64_after_hwframe+0x72/0xdc[31757.687969] Code: 8e f6 ff 44 8b 4c 24 2c 4c 8b 44 24 20 41 89 c4 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 3a 44 89 e7 48 89 44 24 08 e8 b5 8e f6 ff 48[31757.707007] RSP: 002b:00007ffd49c73c70 EFLAGS: 00000293 ORIG_RAX: 000000000000002c[31757.714694] RAX: ffffffffffffffda RBX: 000055a996565380 RCX: 00007fb4c5727c16[31757.721939] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003[31757.729184] RBP: 0000000000000040 R08: 0000000000000000 R09: 0000000000000000[31757.736429] R10: 0000000000000040 R11: 0000000000000293 R12: 0000000000000000[31757.743673] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000[31757.754940] </TASK>To fix this, let s make xsk_xmit a function that will be responsible forgeneric Tx, where RCU is handled accordingly and pull out sanity checksand xs->zc handling. Populate sanity checks to __xsk_sendmsg() andxsk_poll(). 漏洞公开时间:2025-09-15 23:15:51 漏洞创建时间:2025-09-16 00:02:14 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2023-53240 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | | https://git.kernel.org/stable/c/cecc68559cd57fffb2be50685f262b9af2318e16 | | | | https://nvd.nist.gov/vuln/detail/CVE-2023-53240 | | | | https://lore.kernel.org/linux-cve-announce/2025091516-CVE-2023-53240-c379@gregkh/T/#u | | | | https://security-tracker.debian.org/tracker/CVE-2023-53240 | | | | https://lore.kernel.org/linux-cve-announce/2025091516-CVE-2023-53240-c379@gregkh/T | | | | https://git.kernel.org/stable/c/ffe19750e68d0bb21e8110b398346eef20b156a7 | | | | https://bugzilla.redhat.com/show_bug.cgi?id=2395413 | | | | https://www.cve.org/CVERecord?id=CVE-2023-53240 | | | | https://docs.bell-sw.com/security/cves/CVE-2023-53240 | | | | https://git.kernel.org/stable/c/1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b | | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: 七彩瞬析开源风险感知平台 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> | 影响的包 | 修复版本 | 修复补丁 | 问题引入补丁 | 来源 | | ------- | -------- | ------- | -------- | --------- | | gregkh/linux | | https://git.kernel.org/stable/c/cecc68559cd57fffb2be50685f262b9af2318e16.patch | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/ffe19750e68d0bb21e8110b398346eef20b156a7 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b | | ljqc | | | | https://git.kernel.org/stable/c/cecc68559cd57fffb2be50685f262b9af2318e16 | | cvelistv5 | | | | https://git.kernel.org/stable/c/ffe19750e68d0bb21e8110b398346eef20b156a7 | | cvelistv5 | | | | https://git.kernel.org/stable/c/1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b | | cvelistv5 | </details> 二、漏洞分析结构反馈 影响性分析说明: In the Linux kernel, the following vulnerability has been resolved:xsk: check IFF_UP earlier in Tx pathXsk Tx can be triggered via either sendmsg() or poll() syscalls. Thesetwo paths share a call to common function xsk_xmit() which has twosanity checks within. A pseudo code example to show the two paths:__xsk_sendmsg() : xsk_poll():if (unlikely(!xsk_is_bound(xs))) if (unlikely(!xsk_is_bound(xs))) return -ENXIO; return mask;if (unlikely(need_wait)) (...) return -EOPNOTSUPP; xsk_xmit()mark napi id(...)xsk_xmit()xsk_xmit():if (unlikely(!(xs->dev->flags & IFF_UP)))return -ENETDOWN;if (unlikely(!xs->tx))return -ENOBUFS;As it can be observed above, in sendmsg() napi id can be marked oninterface that was not brought up and this causes a NULL ptrdereference:[31757.505631] BUG: kernel NULL pointer dereference, address: 0000000000000018[31757.512710] #PF: supervisor read access in kernel mode[31757.517936] #PF: error_code(0x0000) - not-present page[31757.523149] PGD 0 P4D 0[31757.525726] Oops: 0000 [#1] PREEMPT SMP NOPTI[31757.530154] CPU: 26 PID: 95641 Comm: xdpsock Not tainted 6.2.0-rc5+ #40[31757.536871] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019[31757.547457] RIP: 0010:xsk_sendmsg+0xde/0x180[31757.551799] Code: 00 75 a2 48 8b 00 a8 04 75 9b 84 d2 74 69 8b 85 14 01 00 00 85 c0 75 1b 48 8b 85 28 03 00 00 48 8b 80 98 00 00 00 48 8b 40 20 <8b> 40 18 89 85 14 01 00 00 8b bd 14 01 00 00 81 ff 00 01 00 00 0f[31757.570840] RSP: 0018:ffffc90034f27dc0 EFLAGS: 00010246[31757.576143] RAX: 0000000000000000 RBX: ffffc90034f27e18 RCX: 0000000000000000[31757.583389] RDX: 0000000000000001 RSI: ffffc90034f27e18 RDI: ffff88984cf3c100[31757.590631] RBP: ffff88984714a800 R08: ffff88984714a800 R09: 0000000000000000[31757.597877] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fffffffa[31757.605123] R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000000[31757.612364] FS: 00007fb4c5931180(0000) GS:ffff88afdfa00000(0000) knlGS:0000000000000000[31757.620571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033[31757.626406] CR2: 0000000000000018 CR3: 000000184b41c003 CR4: 00000000007706e0[31757.633648] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000[31757.640894] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400[31757.648139] PKRU: 55555554[31757.650894] Call Trace:[31757.653385] <TASK>[31757.655524] sock_sendmsg+0x8f/0xa0[31757.659077] ? sockfd_lookup_light+0x12/0x70[31757.663416] __sys_sendto+0xfc/0x170[31757.667051] ? do_sched_setscheduler+0xdb/0x1b0[31757.671658] __x64_sys_sendto+0x20/0x30[31757.675557] do_syscall_64+0x38/0x90[31757.679197] entry_SYSCALL_64_after_hwframe+0x72/0xdc[31757.687969] Code: 8e f6 ff 44 8b 4c 24 2c 4c 8b 44 24 20 41 89 c4 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 3a 44 89 e7 48 89 44 24 08 e8 b5 8e f6 ff 48[31757.707007] RSP: 002b:00007ffd49c73c70 EFLAGS: 00000293 ORIG_RAX: 000000000000002c[31757.714694] RAX: ffffffffffffffda RBX: 000055a996565380 RCX: 00007fb4c5727c16[31757.721939] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003[31757.729184] RBP: 0000000000000040 R08: 0000000000000000 R09: 0000000000000000[31757.736429] R10: 0000000000000040 R11: 0000000000000293 R12: 0000000000000000[31757.743673] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000[31757.754940] </TASK>To fix this, let s make xsk_xmit a function that will be responsible forgeneric Tx, where RCU is handled accordingly and pull out sanity checksand xs->zc handling. Populate sanity checks to __xsk_sendmsg() andxsk_poll().The Linux kernel CVE team has assigned CVE-2023-53240 to this issue. openEuler评分: 5.5 Vector:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 受影响版本排查(受影响/不受影响): 1.master(6.12.33):不受影响 2.openEuler-20.03-LTS-SP4(4.19.90):不受影响 3.openEuler-22.03-LTS-SP3(5.10.0):不受影响 4.openEuler-22.03-LTS-SP4(5.10.0):不受影响 5.openEuler-24.03-LTS(6.6.0):不受影响 6.openEuler-24.03-LTS-Next(6.6.0):不受影响 7.openEuler-24.03-LTS-SP1(6.6.0):不受影响 8.openEuler-24.03-LTS-SP2(6.6.0):不受影响 9.openEuler-24.03-LTS-SP3(6.6.0):不受影响 修复是否涉及abi变化(是/否): 1.master(6.12.33):否 2.openEuler-20.03-LTS-SP4(4.19.90):否 3.openEuler-22.03-LTS-SP3(5.10.0):否 4.openEuler-22.03-LTS-SP4(5.10.0):否 5.openEuler-24.03-LTS(6.6.0):否 6.openEuler-24.03-LTS-Next(6.6.0):否 7.openEuler-24.03-LTS-SP1(6.6.0):否 8.openEuler-24.03-LTS-SP2(6.6.0):否 9.openEuler-24.03-LTS-SP3(6.6.0):否 原因说明: 1.master(6.12.33):不受影响-漏洞代码不能被攻击者触发 2.openEuler-20.03-LTS-SP4(4.19.90):不受影响-漏洞代码不存在 3.openEuler-22.03-LTS-SP3(5.10.0):不受影响-漏洞代码不存在 4.openEuler-22.03-LTS-SP4(5.10.0):不受影响-漏洞代码不存在 5.openEuler-24.03-LTS(6.6.0):不受影响-漏洞代码不能被攻击者触发 6.openEuler-24.03-LTS-Next(6.6.0):不受影响-漏洞代码不能被攻击者触发 7.openEuler-24.03-LTS-SP1(6.6.0):不受影响-漏洞代码不能被攻击者触发 8.openEuler-24.03-LTS-SP2(6.6.0):不受影响-漏洞代码不能被攻击者触发 9.openEuler-24.03-LTS-SP3(6.6.0):不受影响-漏洞代码不能被攻击者触发
一、漏洞信息 漏洞编号:[CVE-2023-53240](https://nvd.nist.gov/vuln/detail/CVE-2023-53240) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.19,6.4.0,6.6.0 CVSS V3.x分值: BaseScore:5.5 Medium Vector:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:xsk: check IFF_UP earlier in Tx pathXsk Tx can be triggered via either sendmsg() or poll() syscalls. Thesetwo paths share a call to common function xsk_xmit() which has twosanity checks within. A pseudo code example to show the two paths:__xsk_sendmsg() : xsk_poll():if (unlikely(!xsk_is_bound(xs))) if (unlikely(!xsk_is_bound(xs))) return -ENXIO; return mask;if (unlikely(need_wait)) (...) return -EOPNOTSUPP; xsk_xmit()mark napi id(...)xsk_xmit()xsk_xmit():if (unlikely(!(xs->dev->flags & IFF_UP))) return -ENETDOWN;if (unlikely(!xs->tx)) return -ENOBUFS;As it can be observed above, in sendmsg() napi id can be marked oninterface that was not brought up and this causes a NULL ptrdereference:[31757.505631] BUG: kernel NULL pointer dereference, address: 0000000000000018[31757.512710] #PF: supervisor read access in kernel mode[31757.517936] #PF: error_code(0x0000) - not-present page[31757.523149] PGD 0 P4D 0[31757.525726] Oops: 0000 [#1] PREEMPT SMP NOPTI[31757.530154] CPU: 26 PID: 95641 Comm: xdpsock Not tainted 6.2.0-rc5+ #40[31757.536871] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019[31757.547457] RIP: 0010:xsk_sendmsg+0xde/0x180[31757.551799] Code: 00 75 a2 48 8b 00 a8 04 75 9b 84 d2 74 69 8b 85 14 01 00 00 85 c0 75 1b 48 8b 85 28 03 00 00 48 8b 80 98 00 00 00 48 8b 40 20 <8b> 40 18 89 85 14 01 00 00 8b bd 14 01 00 00 81 ff 00 01 00 00 0f[31757.570840] RSP: 0018:ffffc90034f27dc0 EFLAGS: 00010246[31757.576143] RAX: 0000000000000000 RBX: ffffc90034f27e18 RCX: 0000000000000000[31757.583389] RDX: 0000000000000001 RSI: ffffc90034f27e18 RDI: ffff88984cf3c100[31757.590631] RBP: ffff88984714a800 R08: ffff88984714a800 R09: 0000000000000000[31757.597877] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fffffffa[31757.605123] R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000000[31757.612364] FS: 00007fb4c5931180(0000) GS:ffff88afdfa00000(0000) knlGS:0000000000000000[31757.620571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033[31757.626406] CR2: 0000000000000018 CR3: 000000184b41c003 CR4: 00000000007706e0[31757.633648] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000[31757.640894] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400[31757.648139] PKRU: 55555554[31757.650894] Call Trace:[31757.653385] <TASK>[31757.655524] sock_sendmsg+0x8f/0xa0[31757.659077] ? sockfd_lookup_light+0x12/0x70[31757.663416] __sys_sendto+0xfc/0x170[31757.667051] ? do_sched_setscheduler+0xdb/0x1b0[31757.671658] __x64_sys_sendto+0x20/0x30[31757.675557] do_syscall_64+0x38/0x90[31757.679197] entry_SYSCALL_64_after_hwframe+0x72/0xdc[31757.687969] Code: 8e f6 ff 44 8b 4c 24 2c 4c 8b 44 24 20 41 89 c4 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 3a 44 89 e7 48 89 44 24 08 e8 b5 8e f6 ff 48[31757.707007] RSP: 002b:00007ffd49c73c70 EFLAGS: 00000293 ORIG_RAX: 000000000000002c[31757.714694] RAX: ffffffffffffffda RBX: 000055a996565380 RCX: 00007fb4c5727c16[31757.721939] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003[31757.729184] RBP: 0000000000000040 R08: 0000000000000000 R09: 0000000000000000[31757.736429] R10: 0000000000000040 R11: 0000000000000293 R12: 0000000000000000[31757.743673] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000[31757.754940] </TASK>To fix this, let s make xsk_xmit a function that will be responsible forgeneric Tx, where RCU is handled accordingly and pull out sanity checksand xs->zc handling. Populate sanity checks to __xsk_sendmsg() andxsk_poll(). 漏洞公开时间:2025-09-15 23:15:51 漏洞创建时间:2025-09-16 00:02:14 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2023-53240 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | | https://git.kernel.org/stable/c/cecc68559cd57fffb2be50685f262b9af2318e16 | | | | https://nvd.nist.gov/vuln/detail/CVE-2023-53240 | | | | https://lore.kernel.org/linux-cve-announce/2025091516-CVE-2023-53240-c379@gregkh/T/#u | | | | https://security-tracker.debian.org/tracker/CVE-2023-53240 | | | | https://lore.kernel.org/linux-cve-announce/2025091516-CVE-2023-53240-c379@gregkh/T | | | | https://git.kernel.org/stable/c/ffe19750e68d0bb21e8110b398346eef20b156a7 | | | | https://bugzilla.redhat.com/show_bug.cgi?id=2395413 | | | | https://www.cve.org/CVERecord?id=CVE-2023-53240 | | | | https://docs.bell-sw.com/security/cves/CVE-2023-53240 | | | | https://git.kernel.org/stable/c/1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b | | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: 七彩瞬析开源风险感知平台 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> | 影响的包 | 修复版本 | 修复补丁 | 问题引入补丁 | 来源 | | ------- | -------- | ------- | -------- | --------- | | gregkh/linux | | https://git.kernel.org/stable/c/cecc68559cd57fffb2be50685f262b9af2318e16.patch | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/ffe19750e68d0bb21e8110b398346eef20b156a7 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b | | ljqc | | | | https://git.kernel.org/stable/c/cecc68559cd57fffb2be50685f262b9af2318e16 | | cvelistv5 | | | | https://git.kernel.org/stable/c/ffe19750e68d0bb21e8110b398346eef20b156a7 | | cvelistv5 | | | | https://git.kernel.org/stable/c/1596dae2f17ec5c6e8c8f0e3fec78c5ae55c1e0b | | cvelistv5 | </details> 二、漏洞分析结构反馈 影响性分析说明: In the Linux kernel, the following vulnerability has been resolved:xsk: check IFF_UP earlier in Tx pathXsk Tx can be triggered via either sendmsg() or poll() syscalls. Thesetwo paths share a call to common function xsk_xmit() which has twosanity checks within. A pseudo code example to show the two paths:__xsk_sendmsg() : xsk_poll():if (unlikely(!xsk_is_bound(xs))) if (unlikely(!xsk_is_bound(xs))) return -ENXIO; return mask;if (unlikely(need_wait)) (...) return -EOPNOTSUPP; xsk_xmit()mark napi id(...)xsk_xmit()xsk_xmit():if (unlikely(!(xs->dev->flags & IFF_UP)))return -ENETDOWN;if (unlikely(!xs->tx))return -ENOBUFS;As it can be observed above, in sendmsg() napi id can be marked oninterface that was not brought up and this causes a NULL ptrdereference:[31757.505631] BUG: kernel NULL pointer dereference, address: 0000000000000018[31757.512710] #PF: supervisor read access in kernel mode[31757.517936] #PF: error_code(0x0000) - not-present page[31757.523149] PGD 0 P4D 0[31757.525726] Oops: 0000 [#1] PREEMPT SMP NOPTI[31757.530154] CPU: 26 PID: 95641 Comm: xdpsock Not tainted 6.2.0-rc5+ #40[31757.536871] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019[31757.547457] RIP: 0010:xsk_sendmsg+0xde/0x180[31757.551799] Code: 00 75 a2 48 8b 00 a8 04 75 9b 84 d2 74 69 8b 85 14 01 00 00 85 c0 75 1b 48 8b 85 28 03 00 00 48 8b 80 98 00 00 00 48 8b 40 20 <8b> 40 18 89 85 14 01 00 00 8b bd 14 01 00 00 81 ff 00 01 00 00 0f[31757.570840] RSP: 0018:ffffc90034f27dc0 EFLAGS: 00010246[31757.576143] RAX: 0000000000000000 RBX: ffffc90034f27e18 RCX: 0000000000000000[31757.583389] RDX: 0000000000000001 RSI: ffffc90034f27e18 RDI: ffff88984cf3c100[31757.590631] RBP: ffff88984714a800 R08: ffff88984714a800 R09: 0000000000000000[31757.597877] R10: 0000000000000001 R11: 0000000000000000 R12: 00000000fffffffa[31757.605123] R13: 0000000000000000 R14: 0000000000000003 R15: 0000000000000000[31757.612364] FS: 00007fb4c5931180(0000) GS:ffff88afdfa00000(0000) knlGS:0000000000000000[31757.620571] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033[31757.626406] CR2: 0000000000000018 CR3: 000000184b41c003 CR4: 00000000007706e0[31757.633648] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000[31757.640894] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400[31757.648139] PKRU: 55555554[31757.650894] Call Trace:[31757.653385] <TASK>[31757.655524] sock_sendmsg+0x8f/0xa0[31757.659077] ? sockfd_lookup_light+0x12/0x70[31757.663416] __sys_sendto+0xfc/0x170[31757.667051] ? do_sched_setscheduler+0xdb/0x1b0[31757.671658] __x64_sys_sendto+0x20/0x30[31757.675557] do_syscall_64+0x38/0x90[31757.679197] entry_SYSCALL_64_after_hwframe+0x72/0xdc[31757.687969] Code: 8e f6 ff 44 8b 4c 24 2c 4c 8b 44 24 20 41 89 c4 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 3a 44 89 e7 48 89 44 24 08 e8 b5 8e f6 ff 48[31757.707007] RSP: 002b:00007ffd49c73c70 EFLAGS: 00000293 ORIG_RAX: 000000000000002c[31757.714694] RAX: ffffffffffffffda RBX: 000055a996565380 RCX: 00007fb4c5727c16[31757.721939] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003[31757.729184] RBP: 0000000000000040 R08: 0000000000000000 R09: 0000000000000000[31757.736429] R10: 0000000000000040 R11: 0000000000000293 R12: 0000000000000000[31757.743673] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000[31757.754940] </TASK>To fix this, let s make xsk_xmit a function that will be responsible forgeneric Tx, where RCU is handled accordingly and pull out sanity checksand xs->zc handling. Populate sanity checks to __xsk_sendmsg() andxsk_poll().The Linux kernel CVE team has assigned CVE-2023-53240 to this issue. openEuler评分: 5.5 Vector:CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 受影响版本排查(受影响/不受影响): 1.master(6.12.33):不受影响 2.openEuler-20.03-LTS-SP4(4.19.90):不受影响 3.openEuler-22.03-LTS-SP3(5.10.0):不受影响 4.openEuler-22.03-LTS-SP4(5.10.0):不受影响 5.openEuler-24.03-LTS(6.6.0):不受影响 6.openEuler-24.03-LTS-Next(6.6.0):不受影响 7.openEuler-24.03-LTS-SP1(6.6.0):不受影响 8.openEuler-24.03-LTS-SP2(6.6.0):不受影响 9.openEuler-24.03-LTS-SP3(6.6.0):不受影响 修复是否涉及abi变化(是/否): 1.master(6.12.33):否 2.openEuler-20.03-LTS-SP4(4.19.90):否 3.openEuler-22.03-LTS-SP3(5.10.0):否 4.openEuler-22.03-LTS-SP4(5.10.0):否 5.openEuler-24.03-LTS(6.6.0):否 6.openEuler-24.03-LTS-Next(6.6.0):否 7.openEuler-24.03-LTS-SP1(6.6.0):否 8.openEuler-24.03-LTS-SP2(6.6.0):否 9.openEuler-24.03-LTS-SP3(6.6.0):否 原因说明: 1.master(6.12.33):不受影响-漏洞代码不能被攻击者触发 2.openEuler-20.03-LTS-SP4(4.19.90):不受影响-漏洞代码不存在 3.openEuler-22.03-LTS-SP3(5.10.0):不受影响-漏洞代码不存在 4.openEuler-22.03-LTS-SP4(5.10.0):不受影响-漏洞代码不存在 5.openEuler-24.03-LTS(6.6.0):不受影响-漏洞代码不能被攻击者触发 6.openEuler-24.03-LTS-Next(6.6.0):不受影响-漏洞代码不能被攻击者触发 7.openEuler-24.03-LTS-SP1(6.6.0):不受影响-漏洞代码不能被攻击者触发 8.openEuler-24.03-LTS-SP2(6.6.0):不受影响-漏洞代码不能被攻击者触发 9.openEuler-24.03-LTS-SP3(6.6.0):不受影响-漏洞代码不能被攻击者触发
Comments (
5
)
Sign in
to comment
Status
Done
Backlog
已挂起
Doing
Done
Declined
Assignees
Not set
CTC-Xibo.Wang
CTC-XiboWang
Assignee
Collaborator
+Assign
+Mention
Labels
CVE/UNAFFECTED
sig/Kernel
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)
参与者(2)
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