freebsd-src/sys/fs/tarfs
Dag-Erling Smørgrav ce6a0c776b tarfs: Fix issues revealed by static analysis and testing.
* tarfs_alloc_mount(): Remove an unnecessary null check (CID 1504505) and an unused variable.

* tarfs_alloc_one(): Verify that the file size is not negative (CID 1504506).  While there, also validate the mode, owner and group.

* tarfs_vget(), tarfs_zio_init(): Explicitly ignore return value from getnewvnode(), which cannot fail (CID 1504508)

* tarfs_lookup_path(): Fix a case where a specially-crafted tarball could trigger a null pointer dereference by first descending into, and then backing out of, a previously unknown directory. (CID 1504515)

* mktar: Construct a tarball that triggers the aforementioned null pointer dereference.

Reported by:	Coverity
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	imp, kib
Differential Revision:	https://reviews.freebsd.org/D38463
2023-02-09 17:35:47 +00:00
..
tarfs.h tarfs: Remove unused code. 2023-02-02 23:16:17 +00:00
tarfs_dbg.h
tarfs_io.c tarfs: Fix issues revealed by static analysis and testing. 2023-02-09 17:35:47 +00:00
tarfs_subr.c tarfs: Remove unused code. 2023-02-02 23:16:17 +00:00
tarfs_vfsops.c tarfs: Fix issues revealed by static analysis and testing. 2023-02-09 17:35:47 +00:00
tarfs_vnops.c tarfs: Fix issues revealed by static analysis and testing. 2023-02-09 17:35:47 +00:00