Skip to content

Commit

Permalink
fix crash in ecp_nistz256_point_add_affine()
Browse files Browse the repository at this point in the history
The .rodata section with precomputed constant `ecp_nistz256_precomputed` needs to be
terminated by .text, because the ecp_nistz256_precomputed' happens to be the
first section in the file. The lack of .text makes code to arrive into the same
.rodata section where ecp_nistz256_precomputed is found. The exception is raised
as soon as CPU attempts to execute the code from read only section.

Fixes #24184
  • Loading branch information
Sashan committed Apr 18, 2024
1 parent 1692e0d commit 5e1374d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/ec/asm/ecp_nistz256-x86_64.pl
Expand Up @@ -4736,6 +4736,7 @@ ()
}
print <<___;
.size ecp_nistz256_precomputed,.-ecp_nistz256_precomputed
.text
___

$code =~ s/\`([^\`]*)\`/eval $1/gem;
Expand Down

0 comments on commit 5e1374d

Please sign in to comment.