aboutsummaryrefslogtreecommitdiff
path: root/contrib/perl5/ext/Sys
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2025-10-17 11:54:48 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2025-10-20 16:11:48 +0000
commitbbf986d0f140d847b9e0c808bf6006b62e85e78e (patch)
treee082843438d386bf13e92849a35a8a2bd6e72c8d /contrib/perl5/ext/Sys
parent549cba3c9d1e14fffa9a99ed7b6ee51eb6d20e51 (diff)
quot: Fix benign buffer overflowstable/13
If it encounters an inode whose owner does not have a pw entry, quot allocates a 7-byte buffer (8 in practice, since that is the minimum allocation size) and uses it to store the numeric uid preceded by a hash character. This will overflow the allocated buffer if the UID exceeds 6 decimal digits. Avoid this by using asprintf() instead. While here, simplify the common case as well using strdup(). Reported by: Igor Gabriel Sousa e Souza <igor@bsdtrust.com> MFC after: 3 days Reviewed by: obiwac, emaste Differential Revision: https://reviews.freebsd.org/D53129 (cherry picked from commit 5854d1cbab1073d78519e7ad9a6eb5726341d587)
Diffstat (limited to 'contrib/perl5/ext/Sys')
0 files changed, 0 insertions, 0 deletions