The power8 strncasecmp assembly implementation may read one byte beyond its input buffers. This is benign in general, but may result in a crash if the byte is inaccessible, e.g. when one of the input strings is at the edge of a page. Location1: L(bytebybyte) entry — [ initial lbz loads at lines 358–359 occur before the r5 == 0 guard check: ] lbz rCHAR1, 0(rSTR1) /* Load char from s1 */ lbz rCHAR2, 0(rSTR2) /* Load char from s2 */ rldicl rTMP, r5, 62, 2 cmpdi cr7, rTMP, 0 Location2: L(loop) — [ next-byte loads occur before the bdnz termination check: ] beq cr1, L(done) lbz rCHAR1, 0(rSTR1) /* Load char from s1 */ lbz rCHAR2, 0(rSTR2) /* Load char from s2 */ bdnz L(loop) Location3: L(loop1) — [ same ordering problem in the short-count loop: ] beq cr1, L(done) addi rSTR1, rSTR1, 1 addi rSTR2, rSTR2, 1 lbz rCHAR1, 0(rSTR1) lbz rCHAR2, 0(rSTR2) bdnz L(loop1)
Created attachment 17042 [details] AISLE-Report-PSIRTSUPT-14394.md This is the report that Red Hat received. Suggested attribution: Found by AISLE in partnership with Red Hat The original report only identified two of the three places that need to be fixed, as far as I can tell.
Changes are pushed with commit id: e622f82ea8797704ac8f761f88ed3e429e97fedd
Closing as resolved.