HardenedBSD/src cdf14d1sbin/pfctl pfctl_parser.c pfctl_table.c, share/man/man5 pf.conf.5

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+67-0tests/sys/netpfil/pf/fragmentation_pass.sh
+59-0tests/sys/netpfil/pf/pflog.sh
+30-15sbin/pfctl/pfctl_parser.c
+25-10sbin/pfctl/pfctl_table.c
+12-0sys/netpfil/pf/pf_norm.c
+9-2share/man/man5/pf.conf.5
+202-2711 files not shown
+236-3817 files

HardenedBSD/src 32081c5sbin/pfctl pfctl_parser.c pfctl_table.c, share/man/man5 pf.conf.5

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+67-0tests/sys/netpfil/pf/fragmentation_pass.sh
+59-0tests/sys/netpfil/pf/pflog.sh
+30-15sbin/pfctl/pfctl_parser.c
+25-10sbin/pfctl/pfctl_table.c
+12-0sys/netpfil/pf/pf_norm.c
+9-2share/man/man5/pf.conf.5
+202-2711 files not shown
+236-3817 files

HardenedBSD/src d0ea3detests/sys/netpfil/pf pflog.sh

pf tests: verify rule numbers in pflog output

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+59-0tests/sys/netpfil/pf/pflog.sh
+59-01 files

HardenedBSD/src 8e84e94sbin/pfctl pfctl.h

pfctl: remove prototypes with no matching function

Obtained from:  OpenBSD, jsg <jsg at openbsd.org>, 6768654732
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-2sbin/pfctl/pfctl.h
+0-21 files

HardenedBSD/src a66df2bsys/net pfvar.h

pf: sync_ifp doesn't exist, remove externs

Obtained from:  OpenBSD, jsg <jsg at openbsd.org>, 7ac7a88014
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-2sys/net/pfvar.h
+0-21 files

HardenedBSD/src 2c42aecsbin/pfctl pfctl_table.c

pfctl: ctime(3) and ctime_r(3) can fail when timestamps are way off.

Add missing error checks

Input kettenis, millert
OK millert

Obtained from:  OpenBSD, florian <florian at openbsd.org>, a7b9eedcb4
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+25-10sbin/pfctl/pfctl_table.c
+25-101 files

HardenedBSD/src 5e89648tests/sys/netpfil/pf fragmentation_pass.sh

pf tests: test fragment counters

Ensure that the fragmentation counters work as expected.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+67-0tests/sys/netpfil/pf/fragmentation_pass.sh
+67-01 files

HardenedBSD/src 864458cshare/man/man5 pf.conf.5

pf.conf.5: document tcp.tsdiff

from jesper wallin
ok bluhm

Obtained from:  OpenBSD, jmc <jmc at openbsd.org>, 8c83d32726
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+5-2share/man/man5/pf.conf.5
+5-21 files

HardenedBSD/src c00aca9lib/libpfctl libpfctl.c, sbin/pfctl pfctl_parser.c

pf: Show pf fragment reassembly counters.

Framgent count and statistics are stored in struct pf_status.  From
there pfctl(8) and systat(1) collect and show them.  Note that pfctl
-s info needs the -v switch to show fragments.

input claudio@; OK henning@

Obtained from:  OpenBSD, bluhm <bluhm at openbsd.org>, 19e99d0613
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+14-0sbin/pfctl/pfctl_parser.c
+12-0sys/netpfil/pf/pf_norm.c
+6-0sys/netpfil/pf/pf_ioctl.c
+6-0sys/netpfil/pf/pf.h
+3-0sys/netpfil/pf/pf_nl.c
+3-0lib/libpfctl/libpfctl.c
+44-03 files not shown
+50-09 files

HardenedBSD/src 79a0959sbin/pfctl pfctl_parser.c

pfctl: add af-to and other missing action types in print_rule()

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-1sbin/pfctl/pfctl_parser.c
+1-11 files

HardenedBSD/src 0a67f60share/man/man5 pf.conf.5

pf.conf.5: hint how to set tcp timeout collectively

Hint that the tcp timeout values can be adjusted collectively via "set
optimization".

from jesper wallin
ok bluhm

Obtained from:  OpenBSD, jmc <jmc at openbsd.org>, df80715c2d
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+4-0share/man/man5/pf.conf.5
+4-01 files

HardenedBSD/src c2d03a9sbin/pfctl pfctl_parser.c

pfctl: fix anchortypes bounds test

found by "buffer overflow 'anchortypes' 10 <= 12" smatch error
feedback and ok sashan@, ok miod@ on an earlier version

Obtained from:  OpenBSD, jsg <jsg at openbsd.org>, 730c5d0121
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+15-14sbin/pfctl/pfctl_parser.c
+15-141 files

HardenedBSD/src 4894f5bsys/dev/acpica acpi.c

acpi: Fix build when `ACPI_DEBUG_OUTPUT` defined

Reviewed by:    olce
Fixes:          ce5e22b28ef6 ("acpi: Use sleep types defined in sys/power.h")
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52545
DeltaFile
+2-2sys/dev/acpica/acpi.c
+2-21 files

HardenedBSD/src ef2f36blib/libsys jail.2

jail.2: Mention EPERM is returned on open directories

The manual page does not directly mention this reason for getting EPERM,
instead referring the reader to chroot(2).  We have had some questions
about it recently, in part due to a bug (fixed), and this case is not an
obvious permission/problem, so let's be more explicit.

PR:             280809
Reviewed by:    jamie
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52319
DeltaFile
+4-1lib/libsys/jail.2
+4-11 files

HardenedBSD/src 7780766tools/test/stress2/misc kevent10.sh

stress2: Do not exit the test program without clearing the trace flags
Discussed with:  kib
DeltaFile
+4-4tools/test/stress2/misc/kevent10.sh
+4-41 files

HardenedBSD/src 65f3b48. UPDATING, sys/fs/fuse fuse_vnops.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+10-2tests/sys/fs/fusefs/last_local_modify.cc
+6-6UPDATING
+3-0sys/modules/Makefile
+1-1sys/fs/fuse/fuse_vnops.c
+20-94 files

HardenedBSD/src 1e833c3. UPDATING, sys/fs/fuse fuse_vnops.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+10-2tests/sys/fs/fusefs/last_local_modify.cc
+6-6UPDATING
+3-0sys/modules/Makefile
+1-1sys/fs/fuse/fuse_vnops.c
+20-94 files

HardenedBSD/src 48f2bc0lib/libjail jail.c, lib/libsys kqueue.2

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+136-2sys/kern/kern_jaildesc.c
+20-59sys/kern/kern_event.c
+28-26lib/libsys/kqueue.2
+12-12sys/sys/event.h
+9-1lib/libjail/jail.c
+2-4sys/kern/kern_jail.c
+207-1041 files not shown
+211-1047 files

HardenedBSD/src deaa609lib/libjail jail.c, sys/kern kern_jail.c

jaildesc: remove desc from the sysctl parameter list

Like lastjid, desc should count as a pseudo-parameter.  The difference
lies entirely in the security.jail.param sysctls, which list all of
the jail parameters.  Since desc opens and returns a file descriptor,
it has no place in such uses as "jls all."  Like lastjid, it's still
recognized by the kernel if passed in/out, and hard-coded into libjail
so it can be recognized there.

(cherry picked from commit e75dda31c1eead9ad40580bd8fec17f2bbf55a21)
DeltaFile
+9-1lib/libjail/jail.c
+0-1sys/kern/kern_jail.c
+9-22 files

HardenedBSD/src 9d7f89elib/libsys kqueue.2, sys/kern kern_jaildesc.c kern_event.c

jaildesc: add kevent support

Give jail descriptors the same kevent flags as jails.  Also fix the
event reporting in jails, where it was including data for events the
user didn't ask for.

(cherry picked from commit 66d8ffe3046ded1eb3f78599c6af8eb965482ef5)
DeltaFile
+136-2sys/kern/kern_jaildesc.c
+10-8sys/kern/kern_event.c
+14-1lib/libsys/kqueue.2
+3-2sys/sys/event.h
+4-0sys/sys/jaildesc.h
+1-0sys/kern/kern_jail.c
+168-136 files

HardenedBSD/src 1a849fflib/libsys kqueue.2, sys/kern kern_event.c kern_jail.c

jail: simplify EVFILT_JAIL events

Instead of using the EVFILT_PROC model of attempting to automatically
register new events when a child jail is created, just give a single
event when a child jail is created.  As was already done with jail
attach events, make a best-effort report of the added jail's id in
kn_data.  If the are multiple NOTE_JAIL_CHILD and/or NOTE_JAIL_ATTACH
events, set the NOTE_JAIL_MULTI flag, and don't report anything in
data, indicating that the caller will need to query the system state
on their own.

(cherry picked from commit dbcaac13e49c88d1c077f34f56dd2b7ba77a145a)
DeltaFile
+15-56sys/kern/kern_event.c
+15-26lib/libsys/kqueue.2
+10-11sys/sys/event.h
+1-3sys/kern/kern_jail.c
+41-964 files

HardenedBSD/src e239f49. UPDATING

UPDATING: fix typos

Fixed typos in UPDATING

Signed-off-by: Harry Fellowes <harryfellowes1 at gmail.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1846
DeltaFile
+6-6UPDATING
+6-61 files

HardenedBSD/src 5e0a485sys/modules Makefile

iwlwifi: Don't compile for gcc before 14

gcc 13 and earlier don't have __builtin_bitcountg. The linux wifi kpi
uses this unconditionally. While in this one use, it might not be
needed, I opted to not compile iwlwifi when building gcc12 or 13 rather
than risk breaking it for everbody else.

With this change gcc12 builds the kernel. Maybe this will stop jenkins
email for every commit I make.

Sponsored by:           Netflix
DeltaFile
+3-0sys/modules/Makefile
+3-01 files

HardenedBSD/src 2918cf3sys/fs/fuse fuse_vnops.c

fusefs: spaces to tabs.  No functional change.

[skip ci]
DeltaFile
+1-1sys/fs/fuse/fuse_vnops.c
+1-11 files

HardenedBSD/src d1eaa52tests/sys/fs/fusefs last_local_modify.cc

fusefs: fix the last_local_modify LLM/LastLocalModify.lookup/3 test

The LastLocalModify tests were originally written to simulate a race
condition between VOP_SETATTR and VOP_LOOKUP.  They were later extended
to cover some other VOPs that can affect file size, including VOP_WRITE.
However, the test never correctly simulated the race with VOP_WRITE.  So
that test only ever passed by accident.  Fix it by always opening the
file with O_DIRECT.

PR:             289237
Reported by:    Siva Mahadevan <me at svmhdvn.name>
MFC after:      1 week
DeltaFile
+10-2tests/sys/fs/fusefs/last_local_modify.cc
+10-21 files

HardenedBSD/src 2e77ae8sys/dev/acpica acpi.c acpivar.h, sys/kern subr_power.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+263-159sys/dev/acpica/acpi.c
+125-33sys/vm/vm_fault.c
+123-7sys/kern/subr_power.c
+50-3sys/sys/power.h
+13-12sys/x86/acpica/acpi_apm.c
+8-8sys/dev/acpica/acpivar.h
+582-2221 files not shown
+584-2247 files

HardenedBSD/src e34972asys/dev/acpica acpi.c acpivar.h, sys/kern subr_power.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+263-159sys/dev/acpica/acpi.c
+125-33sys/vm/vm_fault.c
+123-7sys/kern/subr_power.c
+50-3sys/sys/power.h
+13-12sys/x86/acpica/acpi_apm.c
+8-8sys/dev/acpica/acpivar.h
+582-2221 files not shown
+584-2247 files

HardenedBSD/src eb3d2b1sbin/dhclient packet.c, sys/netinet tcp_subr.c

Merge branch 'freebsd/14-stable/main' into hardened/14-stable/master
DeltaFile
+35-18sbin/dhclient/packet.c
+3-3sys/netinet/tcp_subr.c
+4-0sys/sys/sockio.h
+42-213 files

HardenedBSD/src d82ee89sbin/dhclient packet.c, sys/netinet tcp_subr.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+35-18sbin/dhclient/packet.c
+3-3sys/netinet/tcp_subr.c
+38-212 files

HardenedBSD/src e779891sys/dev/acpica acpi.c, sys/kern subr_power.c

sys/power: Sleep type reporting by PM backends

Allow PM backends to report supported sleep types when registering
through `power_pm_register`. Expose this information through
`kern.power.supported_stype` sysctl, and set defaults for
`power_standby/suspend/hibernate_stype` based on this.

Implement this in ACPI PM backend.

Reviewed by:    mckusick (mentor), markj
Approved by:    mckusick (mentor), markj
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52044
DeltaFile
+41-5sys/kern/subr_power.c
+4-2sys/dev/acpica/acpi.c
+2-1sys/sys/power.h
+47-83 files