Sachin Monga
e622f82ea8
powerpc: Fix one byte overread in strncasecmp (bug 34683, CVE-2026-97399)
...
The Power8 strncasecmp (strcasecmp.S with USE_AS_STRNCASECMP) touches
s1[n]/s2[n] in three places when the first n bytes compare equal and
contain no NUL: L(loop) preloads the next byte before its bdnz;
L(loop1) increments then loads before its bdnz; and L(bytebybyte) loads
s1[0]/s2[0] before checking r5. A caller that maps exactly n readable bytes
can get SIGSEGV if byte n falls on an unmapped page.
The L(bytebybyte) site was identified by Florian Weimer; the
original AISLE report covered only the two loops.
Fix all three sites: guard L(bytebybyte) with a r5 == 0 check, split the
bdnz/load pairs in L(loop) and L(loop1) so the load only runs when the
count is still positive, and preload rCHAR1/rCHAR2 in L(lessthan4) after
confirming r5 != 0. strcasecmp is unaffected; its generated code is
unchanged.
Add string/test-strncasecmp-nonarray.c, built on the test-Xncmp-nonarray.c
skeleton: maps a PROT_NONE page past both buffers and sweeps all start
offsets and lengths. Runs as an xtest.
Reported-by: AISLE in partnership with Red Hat
Suggested-by: Florian Weimer <fweimer@redhat.com >
2026-10-01 00:52:07 +05:30
..
2026-08-21 14:34:34 -03:00
2026-01-01 13:42:29 -08:00
2026-07-03 14:55:43 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2017-03-23 11:32:29 -03:00
2001-04-26 20:45:18 +00:00
2026-01-01 13:42:29 -08:00
2023-07-24 15:26:17 -03:00
2021-09-03 22:06:44 +05:30
2021-09-03 22:06:44 +05:30
2017-03-23 11:32:29 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2001-03-19 21:40:15 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
1997-09-11 12:09:10 +00:00
2026-10-01 00:52:07 +05:30
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
1997-09-16 00:42:43 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-04-20 13:54:14 +02:00
2026-08-21 14:34:34 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-08-21 14:34:23 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-06-18 19:44:31 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-08-07 10:47:23 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-08-07 10:47:15 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-05-21 16:13:07 +00:00
2026-01-01 13:42:29 -08:00
2026-10-01 00:52:07 +05:30
2026-08-07 10:47:23 -03:00
2026-01-01 13:42:29 -08:00
2024-08-01 09:08:32 +02:00
2026-08-07 10:47:15 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2024-08-01 09:07:34 +02:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2017-03-23 11:32:29 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2017-03-23 11:32:29 -03:00
2026-08-21 14:34:34 -03:00
2026-08-21 14:34:34 -03:00
2026-08-21 14:34:34 -03:00
2026-08-21 14:34:34 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2022-09-22 08:48:04 -03:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00
2017-03-23 11:32:29 -03:00
2017-03-23 11:32:29 -03:00
2017-03-23 11:32:29 -03:00
2017-03-23 11:32:29 -03:00
2017-03-23 11:32:29 -03:00
2009-04-07 06:51:59 +00:00
2009-04-07 06:51:59 +00:00
2026-09-25 06:13:56 -05:00
2025-10-01 15:14:09 +00:00
2025-10-01 15:14:09 +00:00
2026-01-01 13:42:29 -08:00
2026-01-01 13:42:29 -08:00