OPNSense/src 6ce04e5sys/fs/ext2fs ext2_vfsops.c

Add additional check for 'blocks per group' and 'fragments per group' superblock fields.

These fields will not be equal only in case if bigalloc filesystem feature is turned on.
This feature is not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-27-EXT2-12: Denial of Service in openat-0 (vm_fault_hold/ext2_clusteracct)

MFC after:      2 weeks
DeltaFile
+5-0sys/fs/ext2fs/ext2_vfsops.c
+5-01 files

FreeBSD/src 6ce04e5 (r349802)sys/fs/ext2fs ext2_vfsops.c

Add additional check for 'blocks per group' and 'fragments per group' superblock fields.

These fields will not be equal only in case if bigalloc filesystem feature is turned on.
This feature is not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-27-EXT2-12: Denial of Service in openat-0 (vm_fault_hold/ext2_clusteracct)

MFC after:      2 weeks
DeltaFile
+5-0sys/fs/ext2fs/ext2_vfsops.c
+5-01 files

PC-BSD/trueos 0466549sys/fs/ext2fs ext2_vfsops.c

Add additional check for 'blocks per group' and 'fragments per group' superblock fields.

These fields will not be equal only in case if bigalloc filesystem feature is turned on.
This feature is not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-27-EXT2-12: Denial of Service in openat-0 (vm_fault_hold/ext2_clusteracct)

MFC after:      2 weeks
DeltaFile
+5-0sys/fs/ext2fs/ext2_vfsops.c
+5-01 files

HardenedBSD/src 089a21bsys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

PC-BSD/trueos 089a21bsys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

GhostBSD/ghostbsd 089a21bsys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

HardenedBSD/src c008656 (r349801)sys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

FreeBSD/src c008656 (r349801)sys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

OPNSense/src c008656sys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

GhostBSD/ghostbsd c008656 (r349801)sys/fs/ext2fs ext2_balloc.c

Remove ufs fragments logic.

The ext2fs fragments are different from ufs fragments.
In case of ext2fs the fragment should be equal or more then block size.
The values more than block size are used only in case of bigalloc feature, which is does not supported for now.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-22-EXT2-9: Denial of service in ftruncate-0 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+15-71sys/fs/ext2fs/ext2_balloc.c
+15-711 files

GhostBSD/ghostbsd 590517d (r349800)sys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

FreeBSD/src 590517d (r349800)sys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

HardenedBSD/src 37919d6sys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

GhostBSD/ghostbsd 37919d6sys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

OPNSense/src 590517dsys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

PC-BSD/trueos 37919d6sys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

HardenedBSD/src 590517d (r349800)sys/fs/ext2fs ext2_balloc.c

Remove unneeded mount point unlock call.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-11-EXT2-6: Denial Of Service in write-1 (ext2_balloc)

MFC after:      2 weeks
DeltaFile
+0-1sys/fs/ext2fs/ext2_balloc.c
+0-11 files

HardenedBSD/src af80c62sys/fs/ext2fs ext2_vfsops.c

MFC r344755 (by fsu@)
Fix integer overflow possibility.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert
                of Fraunhofer FKIE
Reported as:    FS-2-EXT2-1: Out-of-Bounds Write in nmount (ext2_vget)
Reviewed by:    pfg
MFC after:      1 week

Differential Revision:    https://reviews.freebsd.org/D19326
DeltaFile
+2-2sys/fs/ext2fs/ext2_vfsops.c
+2-21 files

FreeBSD/src c8dd792 (r346189)sys/fs/ext2fs ext2_vfsops.c

MFC r344755 (by fsu@)
Fix integer overflow possibility.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert
                of Fraunhofer FKIE
Reported as:    FS-2-EXT2-1: Out-of-Bounds Write in nmount (ext2_vget)
Reviewed by:    pfg
MFC after:      1 week

Differential Revision:    https://reviews.freebsd.org/D19326
DeltaFile
+2-2sys/fs/ext2fs/ext2_vfsops.c
+2-21 files

FreeBSD/src c78d4f1 (r345272)sys/fs/ext2fs ext2_vfsops.c

MFC: r344757:
Fix double free in case of mount error.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-9-EXT3-2: Denial Of Service in nmount-5 (vm_fault_hold)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19385
DeltaFile
+6-2sys/fs/ext2fs/ext2_vfsops.c
+6-21 files

HardenedBSD/src c78d4f1 (r345272)sys/fs/ext2fs ext2_vfsops.c

MFC: r344757:
Fix double free in case of mount error.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-9-EXT3-2: Denial Of Service in nmount-5 (vm_fault_hold)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19385
DeltaFile
+6-2sys/fs/ext2fs/ext2_vfsops.c
+6-21 files

HardenedBSD/src 6b0855esys/fs/ext2fs ext2_vfsops.c

MFC: r344757:
Fix double free in case of mount error.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-9-EXT3-2: Denial Of Service in nmount-5 (vm_fault_hold)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19385
DeltaFile
+6-2sys/fs/ext2fs/ext2_vfsops.c
+6-21 files

PC-BSD/trueos 6b0855esys/fs/ext2fs ext2_vfsops.c

MFC: r344757:
Fix double free in case of mount error.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-9-EXT3-2: Denial Of Service in nmount-5 (vm_fault_hold)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19385
DeltaFile
+6-2sys/fs/ext2fs/ext2_vfsops.c
+6-21 files

GhostBSD/ghostbsd 6b0855esys/fs/ext2fs ext2_vfsops.c

MFC: r344757:
Fix double free in case of mount error.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-9-EXT3-2: Denial Of Service in nmount-5 (vm_fault_hold)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19385
DeltaFile
+6-2sys/fs/ext2fs/ext2_vfsops.c
+6-21 files

HardenedBSD/src 54126bc (r345268)sys/fs/ext2fs ext2_alloc.c

MFC: r344756, r345179:
Do not read the on-disk inode in case of vnode allocation.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-6-EXT2-4: Denial Of Service in mkdir-0 (ext2_mkdir/vn_rdwr)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19327
DeltaFile
+53-21sys/fs/ext2fs/ext2_alloc.c
+53-211 files

FreeBSD/src 54126bc (r345268)sys/fs/ext2fs ext2_alloc.c

MFC: r344756, r345179:
Do not read the on-disk inode in case of vnode allocation.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-6-EXT2-4: Denial Of Service in mkdir-0 (ext2_mkdir/vn_rdwr)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19327
DeltaFile
+53-21sys/fs/ext2fs/ext2_alloc.c
+53-211 files

PC-BSD/trueos 682e1b9sys/fs/ext2fs ext2_alloc.c

MFC: r344756, r345179:
Do not read the on-disk inode in case of vnode allocation.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-6-EXT2-4: Denial Of Service in mkdir-0 (ext2_mkdir/vn_rdwr)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19327
DeltaFile
+53-21sys/fs/ext2fs/ext2_alloc.c
+53-211 files

GhostBSD/ghostbsd 682e1b9sys/fs/ext2fs ext2_alloc.c

MFC: r344756, r345179:
Do not read the on-disk inode in case of vnode allocation.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-6-EXT2-4: Denial Of Service in mkdir-0 (ext2_mkdir/vn_rdwr)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19327
DeltaFile
+53-21sys/fs/ext2fs/ext2_alloc.c
+53-211 files

HardenedBSD/src 682e1b9sys/fs/ext2fs ext2_alloc.c

MFC: r344756, r345179:
Do not read the on-disk inode in case of vnode allocation.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-6-EXT2-4: Denial Of Service in mkdir-0 (ext2_mkdir/vn_rdwr)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19327
DeltaFile
+53-21sys/fs/ext2fs/ext2_alloc.c
+53-211 files

FreeBSD/src e892a7e (r345267)sys/fs/ext2fs ext2_vfsops.c

MFC: r344755:
Fix integer overflow possibility.

Reported by:    Christopher Krah, Thomas Barabosch, and Jan-Niclas Hilgert of Fraunhofer FKIE
Reported as:    FS-2-EXT2-1: Out-of-Bounds Write in nmount (ext2_vget)
Reviewed by:    pfg

Differential Revision:    https://reviews.freebsd.org/D19326
DeltaFile
+2-2sys/fs/ext2fs/ext2_vfsops.c
+2-21 files