]> git.ipfire.org Git - thirdparty/libarchive.git/commit
[archive_acl] Reject ACL entries with out-of-range numeric IDs
authorTim Kientzle <kientzle@acm.org>
Sat, 2 May 2026 18:51:47 +0000 (11:51 -0700)
committerTim Kientzle <kientzle@acm.org>
Sat, 2 May 2026 23:22:47 +0000 (16:22 -0700)
commit5ca297b7665fa76de6e4d310b8a97ec7d888ccdc
tree72049bd29c3753746ed04fa184fae2171de83d50
parent1cc5c21be243d6290a064d6fcdfbfb47c7f1a4d8
[archive_acl] Reject ACL entries with out-of-range numeric IDs

isint() and isint_w() previously clamped values >= INT_MAX to INT_MAX
and returned success, allowing malformed ACL text to silently set IDs
to an arbitrary sentinel value.  Change them to return -1 (a new
"overflow" indication) instead, and update all callers in both the
NFS4 and POSIX parsers (narrow and wide) to treat overflow as
ARCHIVE_WARN and skip the offending entry.

Add test_acl_nfs4_text.c with four test functions covering NFS4 ACL
text round-trips, audit/alarm entry types, numeric-ID handling
including the overflow boundary (INT_MAX - 1 accepted, INT_MAX
rejected), and malformed-entry error paths.
Makefile.am
libarchive/archive_acl.c
libarchive/test/CMakeLists.txt
libarchive/test/test_acl_nfs4_text.c [new file with mode: 0644]