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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-22003— can: ucan: fix out of bound read in strscpy() source

EPSS 0.08% · P23
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2025-22003

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
can: ucan: fix out of bound read in strscpy() source
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: can: ucan: fix out of bound read in strscpy() source Commit 7fdaf8966aae ("can: ucan: use strscpy() to instead of strncpy()") unintentionally introduced a one byte out of bound read on strscpy()'s source argument (which is kind of ironic knowing that strscpy() is meant to be a more secure alternative :)). Let's consider below buffers: dest[len + 1]; /* will be NUL terminated */ src[len]; /* may not be NUL terminated */ When doing: strncpy(dest, src, len); dest[len] = '\0'; strncpy() will read up to len bytes from src. On the other hand: strscpy(dest, src, len + 1); will read up to len + 1 bytes from src, that is to say, an out of bound read of one byte will occur on src if it is not NUL terminated. Note that the src[len] byte is never copied, but strscpy() still needs to read it to check whether a truncation occurred or not. This exact pattern happened in ucan. The root cause is that the source is not NUL terminated. Instead of doing a copy in a local buffer, directly NUL terminate it as soon as usb_control_msg() returns. With this, the local firmware_str[] variable can be removed. On top of this do a couple refactors: - ucan_ctl_payload->raw is only used for the firmware string, so rename it to ucan_ctl_payload->fw_str and change its type from u8 to char. - ucan_device_request_in() is only used to retrieve the firmware string, so rename it to ucan_get_fw_str() and refactor it to make it directly handle all the string termination logic.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于strscpy函数存在越界读取问题。
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

VendorProductAffected VersionsCPESubscribe
LinuxLinux 7fdaf8966aae476deafe11f9a0067ff588615444 ~ cc29775a8a72d7f3b56cc026796ad99bd65804a7 -
LinuxLinux 6.2 -

II. Public POCs for CVE-2025-22003

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-22003

登录查看更多情报信息。

Same Patch Batch · Linux · 2025-04-03 · 13 CVEs total

CVE-2025-22007Bluetooth: Fix error code in chan_alloc_skb_cb()
CVE-2025-22006net: ethernet: ti: am65-cpsw: Fix NAPI registration sequence
CVE-2025-22005ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw().
CVE-2025-22004net: atm: fix use after free in lec_send()
CVE-2025-22002netfs: Call `invalidate_cache` only if implemented
CVE-2025-22000mm/huge_memory: drop beyond-EOF folios with the right number of refs
CVE-2025-22001accel/qaic: Fix integer overflow in qaic_validate_req()
CVE-2025-21999proc: fix UAF in proc_get_inode()
CVE-2025-21998firmware: qcom: uefisecapp: fix efivars registration race
CVE-2025-21997xsk: fix an integer overflow in xp_create_and_assign_umem()
CVE-2025-21996drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse()
CVE-2025-21995drm/sched: Fix fence reference count leak

IV. Related Vulnerabilities

V. Comments for CVE-2025-22003

No comments yet


Leave a comment