Page MenuHomeFreeBSD

Allow ssp_test:read to pass more reliably
ClosedPublic

Authored by arichardson on Mar 1 2021, 2:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 27, 12:35 AM
Unknown Object (File)
Mon, Jun 16, 2:21 PM
Unknown Object (File)
Sun, Jun 15, 5:10 PM
Unknown Object (File)
Thu, Jun 12, 10:56 PM
Unknown Object (File)
Jun 2 2025, 10:31 PM
Unknown Object (File)
May 30 2025, 2:06 PM
Unknown Object (File)
May 9 2025, 1:46 AM
Unknown Object (File)
Apr 22 2025, 3:17 PM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37477
Build 34366: arc lint + arc unit

Event Timeline

I think this is reasonable. I don't think we care whether SSP detects a stack overflow that overwrites only padding.

This revision is now accepted and ready to land.Mar 1 2021, 3:36 PM
contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
397

I wonder if this consistently works on NetBSD?

contrib/netbsd-tests/lib/libc/ssp/t_ssp.sh
397

Unlikely.