Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-38261— riscv: save the SR_SUM status over switches

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于RISC-V架构未保存SR_SUM状态,可能导致用户空间访问异常。

CVSS 7.8 · High EPSS 0.19% · P8

Possible ATT&CK Techniques 1 AI

T1613 · Container and Resource Discovery

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 76d2a0493a17d4c8ecc781366850c3c4f8e1a446< 1b63cdc0d63ae33522b4714642fbefa298acc274 affected
76d2a0493a17d4c8ecc781366850c3c4f8e1a446< 9e7005c3638134df5b7df467c1d884a2482c77cb affected
76d2a0493a17d4c8ecc781366850c3c4f8e1a446< 69ea599a8dab93a620c92c255be4239a06290a77 affected
76d2a0493a17d4c8ecc781366850c3c4f8e1a446< 788aa64c01f1262310b4c1fb827a36df170d86ea affected
4.15 affected
< 4.15 unaffected
6.6.160≤ 6.6.* unaffected
6.12.114≤ 6.12.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-38261

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
riscv: save the SR_SUM status over switches
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: riscv: save the SR_SUM status over switches When threads/tasks are switched we need to ensure the old execution's SR_SUM state is saved and the new thread has the old SR_SUM state restored. The issue was seen under heavy load especially with the syz-stress tool running, with crashes as follows in schedule_tail: Unable to handle kernel access to user memory without uaccess routines at virtual address 000000002749f0d0 Oops [#1] Modules linked in: CPU: 1 PID: 4875 Comm: syz-executor.0 Not tainted 5.12.0-rc2-syzkaller-00467-g0d7588ab9ef9 #0 Hardware name: riscv-virtio,qemu (DT) epc : schedule_tail+0x72/0xb2 kernel/sched/core.c:4264 ra : task_pid_vnr include/linux/sched.h:1421 [inline] ra : schedule_tail+0x70/0xb2 kernel/sched/core.c:4264 epc : ffffffe00008c8b0 ra : ffffffe00008c8ae sp : ffffffe025d17ec0 gp : ffffffe005d25378 tp : ffffffe00f0d0000 t0 : 0000000000000000 t1 : 0000000000000001 t2 : 00000000000f4240 s0 : ffffffe025d17ee0 s1 : 000000002749f0d0 a0 : 000000000000002a a1 : 0000000000000003 a2 : 1ffffffc0cfac500 a3 : ffffffe0000c80cc a4 : 5ae9db91c19bbe00 a5 : 0000000000000000 a6 : 0000000000f00000 a7 : ffffffe000082eba s2 : 0000000000040000 s3 : ffffffe00eef96c0 s4 : ffffffe022c77fe0 s5 : 0000000000004000 s6 : ffffffe067d74e00 s7 : ffffffe067d74850 s8 : ffffffe067d73e18 s9 : ffffffe067d74e00 s10: ffffffe00eef96e8 s11: 000000ae6cdf8368 t3 : 5ae9db91c19bbe00 t4 : ffffffc4043cafb2 t5 : ffffffc4043cafba t6 : 0000000000040000 status: 0000000000000120 badaddr: 000000002749f0d0 cause: 000000000000000f Call Trace: [<ffffffe00008c8b0>] schedule_tail+0x72/0xb2 kernel/sched/core.c:4264 [<ffffffe000005570>] ret_from_exception+0x0/0x14 Dumping ftrace buffer: (ftrace buffer empty) ---[ end trace b5f8f9231dc87dda ]--- The issue comes from the put_user() in schedule_tail (kernel/sched/core.c) doing the following: asmlinkage __visible void schedule_tail(struct task_struct *prev) { ... if (current->set_child_tid) put_user(task_pid_vnr(current), current->set_child_tid); ... } the put_user() macro causes the code sequence to come out as follows: 1: __enable_user_access() 2: reg = task_pid_vnr(current); 3: *current->set_child_tid = reg; 4: __disable_user_access() The problem is that we may have a sleeping function as argument which could clear SR_SUM causing the panic above. This was fixed by evaluating the argument of the put_user() macro outside the user-enabled section in commit 285a76bb2cf5 ("riscv: evaluate put_user() arg before enabling user access")" In order for riscv to take advantage of unsafe_get/put_XXX() macros and to avoid the same issue we had with put_user() and sleeping functions we must ensure code flow can go through switch_to() from within a region of code with SR_SUM enabled and come back with SR_SUM still enabled. This patch addresses the problem allowing future work to enable full use of unsafe_get/put_XXX() macros without needing to take a CSR bit flip cost on every access. Make switch_to() save and restore SR_SUM.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于RISC-V架构未保存SR_SUM状态,可能导致用户空间访问异常。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 76d2a0493a17d4c8ecc781366850c3c4f8e1a446 ~ 1b63cdc0d63ae33522b4714642fbefa298acc274 -
Linux Linux 4.15 -

II. Public POCs for CVE-2025-38261

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-38261

请登录查看更多情报信息。

Patches & Fixes for CVE-2025-38261 (1)

Same Patch Batch · Linux · 2025-07-09 · 26 CVEs total

CVE-2025-38264 9.8 CRITICAL nvme-tcp: sanitize request list handling
CVE-2025-38246 9.8 CRITICAL bnxt: properly flush XDP redirect lists
CVE-2025-38253 8.8 HIGH HID: wacom: fix crash in wacom_aes_battery_handler()
CVE-2025-38238 8.8 HIGH scsi: fnic: Fix crash in fnic_wq_cmpl_handler when FDMI times out
CVE-2025-38252 7.8 HIGH cxl/ras: Fix CPER handler device confusion
CVE-2025-38262 7.8 HIGH tty: serial: uartlite: register uart driver in init
CVE-2025-38250 7.8 HIGH Bluetooth: hci_core: Fix use-after-free in vhci_flush()
CVE-2025-38248 7.8 HIGH bridge: mcast: Fix use-after-free during router port configuration
CVE-2025-38242 7.8 HIGH mm: userfaultfd: fix race of userfaultfd_move and swap cache
CVE-2025-38244 7.5 HIGH smb: client: fix potential deadlock when reconnecting channels
CVE-2025-38239 7.3 HIGH scsi: megaraid_sas: Fix invalid node index
CVE-2025-38257 7.3 HIGH s390/pkey: Prevent overflow in size calculation for memdup_user()
CVE-2025-38255 lib/group_cpus: fix NULL pointer dereference from group_cpus_evenly()
CVE-2025-38263 bcache: fix NULL pointer in cache_set_flush()
CVE-2025-38241 mm/shmem, swap: fix softlockup with mTHP swapin
CVE-2025-38260 btrfs: handle csum tree error with rescue=ibadroots correctly
CVE-2025-38259 ASoC: codecs: wcd9335: Fix missing free of regulator supplies
CVE-2025-38258 mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write
CVE-2025-38256 io_uring/rsrc: fix folio unpinning
CVE-2025-38254 drm/amd/display: Add sanity checks for drm_edid_raw()

Showing top 20 of 26 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-38261

No comments yet


Leave a comment