HomeFreeBSD

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

Tags
None
Referenced Files
Restricted File
May 12 2023, 10:06 AM
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
GitHub <noreply@github.com>Committed on May 10 2023, 12:55 AM
Parents
rG903c3613d490: Add dmu_tx_hold_append() interface
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGd3db900a4e45: pam: Fix "buffer overflow" in pam ZTS tests on F38 (authored by Tony Hutter <hutter2@llnl.gov>).May 10 2023, 12:55 AM