~mirabilos/klibc/master

  • Committer: Ben Hutchings
  • Date: 2021-04-29 14:02:58 UTC
  • Revision ID: git-v1:9b1c91577aef7f2e72c3aa11a27749160bd278ff
[klibc] cpio: Fix possible integer overflow on 32-bit systems

The maximum name and file sizes in the "new" header format are 32-bit
unsigned values.  However, the I/O functions mostly use long for sizes
and offsets, so that sizes >= 2^31 are handled wrongly on 32-bit
systems.

The current GNU cpio code doesn't seem to have this problem, but the
divergence between this version and that is large enough that I can't
simply cherry-pick a fix for it.

As a short-term fix, in read_in_new_ascii(), fail if c_namesize or
c_filesize is > LONG_MAX.

CVE-2021-31872

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Filename Latest Rev Last Changed Committer Comment Size
..
dash 1210 18 years ago H. Peter Anvin [klibc] Reorganize the standalone klibc tree to ma Diff
gzip 1210 18 years ago H. Peter Anvin [klibc] Reorganize the standalone klibc tree to ma Diff
include 1210 18 years ago H. Peter Anvin [klibc] Reorganize the standalone klibc tree to ma Diff
kinit 971 18 years ago H. Peter Anvin Merge with git+ssh://hera.kernel.org/pub/scm/libs/ Diff
klibc 1210 18 years ago H. Peter Anvin [klibc] Reorganize the standalone klibc tree to ma Diff
utils 1210 18 years ago H. Peter Anvin [klibc] Reorganize the standalone klibc tree to ma Diff
.gitignore 1546 16 years ago H. Peter Anvin klibc: avoid .gitignore in the include directory 104 bytes Diff Download File
Kbuild 1489 16 years ago maximilian attems klibc comment fix * nowadays git is quite feature 2.5 KB Diff Download File