HomeFreeBSD

pam: Fix "buffer overflow" in pam ZTS tests on F38

Tags
None
Referenced Files
Restricted File
Jun 10 2023, 5:37 PM
Subscribers
None

Description

pam: Fix "buffer overflow" in pam ZTS tests on F38

The pam ZTS tests were reporting a buffer overflow on F38, possibly
due to F38 now setting _FORTIFY_SOURCE=3 by default. gdb and
valgrind narrowed this down to a snprintf() buffer overflow in
zfs_key_config_modify_session_counter(). I'm not clear why this
particular snprintf() was being flagged as an overflow, but when
I replaced it with an asprintf(), the test passed reliably.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #14802
Closes #14842

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on May 10 2023, 12:55 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on May 11 2023, 4:07 PM
Parents
rGecaf3ea3f271: ZTS: Minor fixes
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG7c555fee9d76: pam: Fix "buffer overflow" in pam ZTS tests on F38 (authored by Tony Hutter <hutter2@llnl.gov>).May 11 2023, 4:07 PM