public inbox for linux-erofs@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] erofs-utils: lib/tar: fix PAX header parsing issues
@ 2026-03-16  6:51 Utkal Singh
  2026-03-16  6:51 ` [PATCH v2 1/2] erofs-utils: lib/tar: skip PAX entries with empty path Utkal Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Utkal Singh @ 2026-03-16  6:51 UTC (permalink / raw)
  To: linux-erofs; +Cc: xiang, yifan.yfzhao, Utkal Singh

These two patches fix input validation bugs in the PAX extended
header parser in lib/tar.c that can trigger crashes on malformed
or crafted tar archives.

Patch 1 skips PAX entries with empty path= value to avoid
out-of-bounds access on zero-length strings.

Patch 2 rejects negative size= values to prevent heap corruption
from incorrect allocation sizes in subsequent operations.

Changes in v2:
  - Fix mixed indentation in patch 2/2 (use tabs, not spaces)

Utkal Singh (2):
  erofs-utils: lib/tar: skip PAX entries with empty path
  erofs-utils: lib/tar: reject negative size= value in PAX header

 lib/tar.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.43.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-03-16  7:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16  6:51 [PATCH v2 0/2] erofs-utils: lib/tar: fix PAX header parsing issues Utkal Singh
2026-03-16  6:51 ` [PATCH v2 1/2] erofs-utils: lib/tar: skip PAX entries with empty path Utkal Singh
2026-03-16  6:51 ` [PATCH v2 2/2] erofs-utils: lib/tar: reject negative size= value in PAX header Utkal Singh
2026-03-16  7:35 ` [PATCH v2 0/2] erofs-utils: lib/tar: fix PAX header parsing issues Gao Xiang
2026-03-16  7:48   ` Utkal Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox