HardenedBSD/src 57123e5sys/fs/fuse fuse_device.c, sys/netlink/route iface.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+317-0tools/test/stress2/misc/syzkaller88.sh
+210-0tools/test/stress2/misc/syzkaller89.sh
+141-0tools/test/stress2/misc/swap8.sh
+44-0tools/test/stress2/misc/unionfs21.sh
+10-2sys/netlink/route/iface.c
+5-1sys/fs/fuse/fuse_device.c
+727-35 files not shown
+740-511 files

HardenedBSD/src f59758csys/fs/fuse fuse_device.c, sys/netlink/route iface.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+317-0tools/test/stress2/misc/syzkaller88.sh
+210-0tools/test/stress2/misc/syzkaller89.sh
+141-0tools/test/stress2/misc/swap8.sh
+44-0tools/test/stress2/misc/unionfs21.sh
+10-2sys/netlink/route/iface.c
+5-1sys/fs/fuse/fuse_device.c
+727-35 files not shown
+740-511 files

HardenedBSD/src 1713f75sys/netgraph/netflow netflow_v9.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+1-0sys/netgraph/netflow/netflow_v9.c
+1-01 files

HardenedBSD/src c2b5133tools/test/stress2/misc swap8.sh unionfs21.sh

stress2: Added two new test scenarios
DeltaFile
+141-0tools/test/stress2/misc/swap8.sh
+44-0tools/test/stress2/misc/unionfs21.sh
+185-02 files

HardenedBSD/src 833f929tools/test/stress2/misc syzkaller88.sh syzkaller89.sh

stress2: Added two syzkaller reproducers. Updated the exclude file
DeltaFile
+317-0tools/test/stress2/misc/syzkaller88.sh
+210-0tools/test/stress2/misc/syzkaller89.sh
+4-0tools/test/stress2/misc/all.exclude
+531-03 files

HardenedBSD/src 10037d0sbin/mount_fusefs mount_fusefs.8 mount_fusefs.c, sys/fs/fuse fuse_device.c fuse_ipc.h

fusefs: Implement support for the auto_unmount option kernel-side

libfuse clients may pass the "-o auto_unmount" flag to ensure that the mountpoint
will get unmounted even if the server terminate abnormally. Without this flag
sending KILL to a FUSE daemon leaves its mountpoint mounted.

Approved by:    asomers
Differential Revision:  https://reviews.freebsd.org/D53086
DeltaFile
+5-1sys/fs/fuse/fuse_device.c
+4-1sbin/mount_fusefs/mount_fusefs.8
+2-1sys/fs/fuse/fuse_ipc.h
+2-0sbin/mount_fusefs/mount_fusefs.c
+1-0sys/fs/fuse/fuse_vfsops.c
+14-35 files

HardenedBSD/src 04f6b99sys/netlink/route iface.c

netlink: use caller's credentials in rtnl_handle_newlink

Make sure rtnl_handle_newlink sets the caller's credential
during calls to ifc_create_ifp_nl and ifc_modify_ifp_nl

Reviewed by: glebius, melifaro
Approved by: glebius (mentor)
Differential Revision: https://reviews.freebsd.org/D54109
DeltaFile
+10-2sys/netlink/route/iface.c
+10-21 files

HardenedBSD/src f51e0f5sys/netgraph/netflow netflow_v9.c

ng_netflow v9: fix template re-announcement using packet count

Increment fe->sent_packets after export9_send().
Previously, NetFlow v9 templates were only re-announced based on
time, ignoring the packet count parameter (`templ_packets`).

PR:             270083
Reviewed by:    glebius pouria
Approved by:    glebius (mentor)
MFC after:      1 week
Sponsored by:   Subcarpathian BSD User Group

(cherry picked from commit d836dae9f0d888d441234ea11e3cd91614c86aa2)
DeltaFile
+1-0sys/netgraph/netflow/netflow_v9.c
+1-01 files

HardenedBSD/src 463332csys/amd64/include md_var.h, sys/amd64/vmm vmm_host.h

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+3-3tools/tools/nanobsd/defaults.sh
+2-0sys/amd64/vmm/vmm_host.h
+1-0sys/amd64/include/md_var.h
+6-33 files

HardenedBSD/src 89127a0sys/amd64/include md_var.h, sys/amd64/vmm vmm_host.h

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+3-3tools/tools/nanobsd/defaults.sh
+2-0sys/amd64/vmm/vmm_host.h
+1-0sys/amd64/include/md_var.h
+6-33 files

HardenedBSD/src cd730betools/tools/nanobsd defaults.sh

nanobsd: Use mtree -C to produce the metalog

Prefer an mtree -C output, which is guaranteed to be mtree-compatible.
Add "gname", "uname", and "tags" to the default keyword set, while
removing "size" and "time", the latter being set on kernel file entries
and taking precedence over makefs -T (when paired with -F).

As a side effect, this produces a cleaner file with sorted keywords.

Note that passing "-u" to sort in order to pipe to mtree is no longer
necessary, but we'll do it out of habit.

Reviewed by:    imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54854
DeltaFile
+3-3tools/tools/nanobsd/defaults.sh
+3-31 files

HardenedBSD/src 202e310sys/amd64/include md_var.h, sys/amd64/vmm vmm_host.h

amd64: Fix sys/pcpu.h usage in vmm_host.h and md_var.h

Include sys/pcpu in vmm_host.h as its structs and functions are used
there, and add a forward declaration of struct pcpu to md_var.h as it
is used in some function prototypes.

Reviewed by:    corvink, markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D51550
DeltaFile
+2-0sys/amd64/vmm/vmm_host.h
+1-0sys/amd64/include/md_var.h
+3-02 files

HardenedBSD/src 52e58desys/netinet6 nd6.c in6_var.h, usr.bin/mkimg mkimg.1

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+85-89sys/netinet6/nd6.c
+51-20sys/netinet6/in6_var.h
+24-33sys/netinet6/nd6.h
+30-26sys/netinet6/nd6_rtr.c
+13-41sys/netinet6/mld6.c
+34-20usr.bin/mkimg/mkimg.1
+237-22919 files not shown
+332-34825 files

HardenedBSD/src 426507csys/netinet6 nd6.c in6_var.h, usr.bin/mkimg mkimg.1

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+85-89sys/netinet6/nd6.c
+51-20sys/netinet6/in6_var.h
+24-33sys/netinet6/nd6.h
+30-26sys/netinet6/nd6_rtr.c
+34-20usr.bin/mkimg/mkimg.1
+13-41sys/netinet6/mld6.c
+237-22919 files not shown
+332-34825 files

HardenedBSD/src 36848d7share/man/man7 tuning.7, sys/fs/nfsserver nfs_nfsdsubs.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+65-43sys/vm/vm_object.c
+59-37sys/vm/vm_map.c
+46-18sys/vm/swap_pager.c
+38-0sys/fs/nfsserver/nfs_nfsdsubs.c
+15-0share/man/man7/tuning.7
+8-4sys/vm/vm_object.h
+231-1026 files not shown
+248-11512 files

HardenedBSD/src 6fd7e55sys/fs/nfsserver nfs_nfsdsubs.c nfs_nfsdport.c

nfsd: Fix handling of hidden/system during Open/Create

When an NFSv4.n client specifies settings for the archive,
hidden and/or system attributes during a Open/Create, the
Open/Create fails for ZFS.  This is caused by ZFS doing
a secpolicy_xvattr() call, which fails for non-root.
If this check is bypassed, ZFS panics.

This patch resolves the problem by disabling va_flags
for the VOP_CREATE() call in the NFSv4.n server and
then setting the flags with a subsequent VOP_SETATTR().

This problem only affects FreeBSD-15 and main, since the
archive, system and hidden attributes are not enabled
for FreeBSD-14.

I think a similar problem exists for the NFSv4.n
Open/Create/Exclusive_41, but that will be resolved
in a future commit.

    [8 lines not shown]
DeltaFile
+38-0sys/fs/nfsserver/nfs_nfsdsubs.c
+11-0sys/fs/nfsserver/nfs_nfsdport.c
+49-02 files

HardenedBSD/src 2a27aefsys/vm swap_pager.c

swap_pager_getpages(): some pages from ma[] might be bogus

(cherry picked from commit d198ad51ea73bbb162336923a387f52b0b1c1f1d)
DeltaFile
+29-8sys/vm/swap_pager.c
+29-81 files

HardenedBSD/src a4123acsys/kern uipc_shm.c, sys/vm vm_object.c vm_map.c

vm_object: remove the charge member

(cherry picked from commit d160447129fe060b28bcd6ba429d17afdf494ff2)
DeltaFile
+27-19sys/vm/vm_object.c
+22-23sys/vm/vm_map.c
+2-6sys/vm/swap_pager.c
+2-3sys/vm/vm_fault.c
+1-3sys/vm/vm_object.h
+0-2sys/kern/uipc_shm.c
+54-561 files not shown
+54-587 files

HardenedBSD/src b3e6c8eshare/man/man7 tuning.7

tuning.7: wording fixes

(cherry picked from commit 6f41575a94b310614f5ffcee215aee48ced4ad2d)
DeltaFile
+2-2share/man/man7/tuning.7
+2-21 files

HardenedBSD/src 10af3b3share/man/man7 tuning.7

tuning.7: add more explanation about swap (over-)accounting

(cherry picked from commit 457b940bfb6a228af1281f357b627ecf1e26fea5)
DeltaFile
+15-0share/man/man7/tuning.7
+15-01 files

HardenedBSD/src 95eec98sys/vm swap_pager.c

vm/swap_pager.c: silence compiler warning

(cherry picked from commit 325baf00735756d024b903bfcee50b4f09e90129)
DeltaFile
+1-1sys/vm/swap_pager.c
+1-11 files

HardenedBSD/src a6cc48esys/kern kern_sendfile.c

sendfile: remove calculation of unused bsize

(cherry picked from commit 3fe275c1ef45d452d1adc537b7ec1ca6444739ba)
DeltaFile
+3-6sys/kern/kern_sendfile.c
+3-61 files

HardenedBSD/src 7768be6share/man/man7 tuning.7

tuning.7: use the correct word for collapsing

(cherry picked from commit 8cd687a726a8b6cc29f573cba7d6c7ecb683a954)
DeltaFile
+1-1share/man/man7/tuning.7
+1-11 files

HardenedBSD/src 9dbc47dsys/vm vm_map.c

vm_map_entry_delete(): fix the calculation of swap release

(cherry picked from commit acb71820d68bd0dd98964240727e251bc62c92de)
DeltaFile
+1-1sys/vm/vm_map.c
+1-11 files

HardenedBSD/src 0ab96c9sys/vm swap_pager.c vm_map.c

rfork(2): fix swap accounting in vmspace_unshare()

(cherry picked from commit de770681234d001a1f4cdb8121179331dc3a2def)
DeltaFile
+8-2sys/vm/swap_pager.c
+7-0sys/vm/vm_map.c
+1-0sys/vm/vm.h
+16-23 files

HardenedBSD/src 1f6db7dsys/vm swap_pager.c

swap_release_by_cred*(): give some additional info on panics due to underflow

(cherry picked from commit 7361727d4584b5e303183c836497ae2754ce0e53)
DeltaFile
+4-2sys/vm/swap_pager.c
+4-21 files

HardenedBSD/src 102400esys/vm swap_pager.c

swap_pager_getpages(): assert that bp->b_pages[] is accessed in bounds

(cherry picked from commit b02ddb59e64620733a6cbc48fb1d0583a62fef78)
DeltaFile
+3-0sys/vm/swap_pager.c
+3-01 files

HardenedBSD/src 2499392sys/vm vm_map.c vm_object.c

vm_object_coalesce(): return swap reservation back if overcharged

(cherry picked from commit 7685aaea8850f5b6995a17740a016019e0956c70)
DeltaFile
+30-14sys/vm/vm_map.c
+31-10sys/vm/vm_object.c
+7-1sys/vm/vm_object.h
+68-253 files

HardenedBSD/src 99fab30sys/vm vm_object.c

vm_object_coalesce(): simplify common expression

(cherry picked from commit e7053d9a126a60b3c0b1348b6c5131b5f2025894)
DeltaFile
+7-6sys/vm/vm_object.c
+7-61 files

HardenedBSD/src 1e1727asys/vm vm_object.c

vm_object_coalesce(): do not account holes twice

(cherry picked from commit 353ba3bf08fdef69b77e3e565435e50784a51412)
DeltaFile
+7-4sys/vm/vm_object.c
+7-41 files