Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
libcpanel-json-xs-perl (4.39-1deepin1) unstable; urgency=medium

* Fix integer buffer overflow in json_atof_scan1 (CVE-2025-40929)

-- deepin-ci-robot <[email protected]> Mon, 27 Apr 2026 19:07:41 +0800

libcpanel-json-xs-perl (4.39-1) unstable; urgency=medium

* Team upload.
Expand Down
33 changes: 33 additions & 0 deletions debian/patches/cve_2025_40929.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Index: github-libcpanel-json-xs-perl-CVE-2025-40929/XS.xs
===================================================================
--- github-libcpanel-json-xs-perl-CVE-2025-40929.orig/XS.xs
+++ github-libcpanel-json-xs-perl-CVE-2025-40929/XS.xs
@@ -710,16 +710,16 @@ json_atof_scan1 (const char *s, NV *accu
/* if we recurse too deep, skip all remaining digits */
/* to avoid a stack overflow attack */
if (UNLIKELY(--maxdepth <= 0))
- while (((U8)*s - '0') < 10)
+ while (*s >= '0' && *s <= '9')
++s;

for (;;)
{
- U8 dig = (U8)*s - '0';
+ U8 dig = (U8)(*s - '0');

if (UNLIKELY(dig >= 10))
{
- if (dig == (U8)((U8)'.' - (U8)'0'))
+ if (dig == (U8)('.' - '0'))
{
++s;
json_atof_scan1 (s, accum, expo, 1, maxdepth);
@@ -739,7 +739,7 @@ json_atof_scan1 (const char *s, NV *accu
else if (*s == '+')
++s;

- while ((dig = (U8)*s - '0') < 10)
+ while (*s >= '0' && *s <= '9')
exp2 = exp2 * 10 + *s++ - '0';

*expo += neg ? -exp2 : exp2;
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cve_2025_40929.patch
Loading