untrusted comment: verify with openbsd-78-base.pub
RWS3/nvFmk4SWekqoESaL9EsotKUS4eZdIDxXCx4EzfqUr/TKIEDpsK3fQ3WPCOQcoBK8/SXbRok/nx/HN/+UEaJhwj2HwymHQk=

OpenBSD 7.8 errata 016, February 27, 2026:

sysctl requests blocked by pledge(2) create a diagnostic message which
races inside pty(4) and possibly crashes.

Apply by doing:
    signify -Vep /etc/signify/openbsd-78-base.pub -x 016_pledge_sysctl.patch.sig \
        -m - | (cd /usr/src && patch -p0)

And then rebuild and install a new kernel:
    KK=`sysctl -n kern.osversion | cut -d# -f1`
    cd /usr/src/sys/arch/`machine`/compile/$KK
    make obj
    make config
    make
    make install

Index: sys/kern/kern_pledge.c
===================================================================
RCS file: /cvs/src/sys/kern/kern_pledge.c,v
diff -u -p -u -r1.333 kern_pledge.c
--- sys/kern/kern_pledge.c	17 Sep 2025 10:30:10 -0000	1.333
+++ sys/kern/kern_pledge.c	19 Feb 2026 16:35:47 -0000
@@ -798,9 +798,7 @@ pledge_sendfd(struct proc *p, struct fil
 int
 pledge_sysctl(struct proc *p, int miblen, int *mib, void *new)
 {
-	char	buf[80];
 	uint64_t pledge;
-	int	i;
 
 	if ((p->p_p->ps_flags & PS_PLEDGE) == 0)
 		return (0);
@@ -985,14 +983,6 @@ pledge_sysctl(struct proc *p, int miblen
 	    mib[0] == CTL_MACHDEP && mib[1] == CPU_ID_AA64ISAR1)
 		return (0);
 #endif /* CPU_ID_AA64ISAR1 */
-
-	snprintf(buf, sizeof(buf), "%s(%d): pledge sysctl %d:",
-	    p->p_p->ps_comm, p->p_p->ps_pid, miblen);
-	for (i = 0; i < miblen; i++) {
-		char *s = buf + strlen(buf);
-		snprintf(s, sizeof(buf) - (s - buf), " %d", mib[i]);
-	}
-	uprintf("%s\n", buf);
 
 	return pledge_fail(p, EINVAL, 0);
 }
