Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2021 11:08:22 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c8f8369856b5 - stable/13 - Allow ssp_test:read to pass more reliably
Message-ID:  <202104221108.13MB8MhD088470@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8f8369856b5fe8f6ca26a1e045903b119b80213

commit c8f8369856b5fe8f6ca26a1e045903b119b80213
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-03-01 19:50:38 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-04-22 09:42:36 +0000

    Allow ssp_test:read to pass more reliably
    
    It appears that the stackframe layout can be slightly different depending on
    compiler and target architecture. For example, when using CHERI LLVM for RISC-V
    we can actually overflow the buffer by up to 8 bytes without SSP detecting it.
    Fix this by increasing the overflow to 15 bytes.
    
    Reviewed By:    ngie, emaste
    Differential Revision: https://reviews.freebsd.org/D28997
    
    (cherry picked from commit c88c1f23a8989b881a5ca51223289ddb4ce74277)
---
 contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
index 7b963d18e3f7..b9d07b1804b1 100755
--- a/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
+++ b/contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
@@ -390,7 +390,7 @@ read_body()
 	if true; then
 	MAX_PATH=$(getconf _XOPEN_PATH_MAX) || atf_fail "getconf failed"
 	h_pass "$prog $MAX_PATH" "echo foo |"
-	h_fail "$prog $(( $MAX_PATH + 3 ))" "echo bar |"
+	h_fail "$prog $(( $MAX_PATH + 15 ))" "echo bar |"
 	else
 	# End FreeBSD
 	h_pass "$prog 1024" "echo foo |"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104221108.13MB8MhD088470>