summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-01-24 15:24:28 +0000
committertb <>2024-01-24 15:24:28 +0000
commit6db1ed1feaf59b64e81222f16bc861cdb38889ad (patch)
treed45d4074d4292f0e6ab47dfb04d2059b6d9ff9d9 /src
parent507757029f70803dface2476d554510285e7d100 (diff)
downloadopenbsd-6db1ed1feaf59b64e81222f16bc861cdb38889ad.tar.gz
openbsd-6db1ed1feaf59b64e81222f16bc861cdb38889ad.tar.bz2
openbsd-6db1ed1feaf59b64e81222f16bc861cdb38889ad.zip
Avoid a four-byte overread in gcm_ghash_4bit_mmx() on i386
This is a variant of the same logic error fixed in ghash-x86_64.pl r1.6. The code path is only reachable on machines without FXSR or PCLMUL. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/modes/asm/ghash-x86.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/modes/asm/ghash-x86.pl b/src/lib/libcrypto/modes/asm/ghash-x86.pl
index 5e868a43ff..47833582b6 100644
--- a/src/lib/libcrypto/modes/asm/ghash-x86.pl
+++ b/src/lib/libcrypto/modes/asm/ghash-x86.pl
@@ -714,7 +714,7 @@ sub mmx_loop() {
714 } 714 }
715 715
716 &mov (&LB($nlo),&LB($dat)); 716 &mov (&LB($nlo),&LB($dat));
717 &mov ($dat,&DWP(528+$j,"esp")) if (--$j%4==0); 717 &mov ($dat,&DWP(528+$j,"esp")) if (--$j%4==0 && $j>=0);
718 718
719 &movd ($rem[0],$Zlo); 719 &movd ($rem[0],$Zlo);
720 &movz ($rem[1],&LB($rem[1])) if ($i>0); 720 &movz ($rem[1],&LB($rem[1])) if ($i>0);