mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
tarfs: Avoid overflow in exthdr calculation.
MFC after: 3 days PR: 277420 Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44202
This commit is contained in:
parent
8427d94ce0
commit
c291b7914e
1 changed files with 2 additions and 1 deletions
|
|
@ -583,7 +583,8 @@ again:
|
|||
error = EINVAL;
|
||||
goto bad;
|
||||
}
|
||||
if (line + len > exthdr + sz) {
|
||||
if ((uintptr_t)line + len < (uintptr_t)line ||
|
||||
line + len > exthdr + sz) {
|
||||
TARFS_DPF(ALLOC, "%s: exthdr overflow\n",
|
||||
__func__);
|
||||
error = EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue