CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Jun 30 15:12:08 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1737 To generate a diff of this commit: cvs rdiff -u -r1.1.2.87 -r1.1.2.88 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.87 src/doc/CHANGES-7.3:1.1.2.88 --- src/doc/CHANGES-7.3:1.1.2.87 Sat Jun 20 16:16:51 2020 +++ src/doc/CHANGES-7.3 Tue Jun 30 15:12:07 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.87 2020/06/20 16:16:51 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.88 2020/06/30 15:12:07 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -889,3 +889,8 @@ usr.sbin/hdaudioctl/hdaudioctl.h 1.3 human-readable tabulated form. [sborrill, ticket #1736] +etc/mtree/special1.170 + + Fix /private/tmp mode to match etc/rc.d/perusertmp. + [kim, ticket #1737] +
CVS commit: [netbsd-7] src/etc/mtree
Module Name:src Committed By: martin Date: Tue Jun 30 15:10:54 UTC 2020 Modified Files: src/etc/mtree [netbsd-7]: special Log Message: Pull up following revision(s) (requested by kim in ticket #1737): etc/mtree/special: revision 1.170 Fix /private/tmp mode to match etc/rc.d/perusertmp To generate a diff of this commit: cvs rdiff -u -r1.148.2.1 -r1.148.2.2 src/etc/mtree/special Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/special diff -u src/etc/mtree/special:1.148.2.1 src/etc/mtree/special:1.148.2.2 --- src/etc/mtree/special:1.148.2.1 Thu Mar 26 10:54:36 2015 +++ src/etc/mtree/special Tue Jun 30 15:10:54 2020 @@ -1,4 +1,4 @@ -# $NetBSD: special,v 1.148.2.1 2015/03/26 10:54:36 martin Exp $ +# $NetBSD: special,v 1.148.2.2 2020/06/30 15:10:54 martin Exp $ # @(#)special 8.2 (Berkeley) 1/23/94 # # This file may be overwritten on upgrades. @@ -336,7 +336,7 @@ ./etc/racoon/psk.txt type=file mode=0600 optional tags=nodiff ./private type=dir mode=0755 optional -./private/tmp type=dir mode=0111 optional ignore +./private/tmp type=dir mode=0555 optional ignore ./roottype=dir mode=0755 ./root/.cshrc type=file mode=0644
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sat Jun 20 16:16:51 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1736 To generate a diff of this commit: cvs rdiff -u -r1.1.2.86 -r1.1.2.87 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.86 src/doc/CHANGES-7.3:1.1.2.87 --- src/doc/CHANGES-7.3:1.1.2.86 Tue Jun 16 10:36:03 2020 +++ src/doc/CHANGES-7.3 Sat Jun 20 16:16:51 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.86 2020/06/16 10:36:03 bouyer Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.87 2020/06/20 16:16:51 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -880,3 +880,12 @@ sys/dev/usb/if_run.c1.41 corruption. Pointed out by Ilja Van Sprundel. [martin, ticket #1735] +usr.sbin/hdaudioctl/graph.c 1.5 +usr.sbin/hdaudioctl/hdaudioctl.8 1.7 +usr.sbin/hdaudioctl/hdaudioctl.c 1.3,1.4 +usr.sbin/hdaudioctl/hdaudioctl.h 1.3 + + Add show subcommand that displays the codec configuration in + human-readable tabulated form. + [sborrill, ticket #1736] +
CVS commit: [netbsd-7] src/usr.sbin/hdaudioctl
Module Name:src Committed By: martin Date: Sat Jun 20 16:15:45 UTC 2020 Modified Files: src/usr.sbin/hdaudioctl [netbsd-7]: graph.c hdaudioctl.8 hdaudioctl.c hdaudioctl.h Log Message: Pull up following revision(s) (requested by sborrill in ticket #1736): usr.sbin/hdaudioctl/hdaudioctl.8: revision 1.7 usr.sbin/hdaudioctl/graph.c: revision 1.5 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.3 usr.sbin/hdaudioctl/hdaudioctl.c: revision 1.4 usr.sbin/hdaudioctl/hdaudioctl.h: revision 1.3 Add show subcommand that displays the codec configuration in human-readable tabulated form Nix trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.24.1 src/usr.sbin/hdaudioctl/graph.c cvs rdiff -u -r1.6 -r1.6.4.1 src/usr.sbin/hdaudioctl/hdaudioctl.8 cvs rdiff -u -r1.1 -r1.1.28.1 src/usr.sbin/hdaudioctl/hdaudioctl.c cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/hdaudioctl/hdaudioctl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/hdaudioctl/graph.c diff -u src/usr.sbin/hdaudioctl/graph.c:1.2 src/usr.sbin/hdaudioctl/graph.c:1.2.24.1 --- src/usr.sbin/hdaudioctl/graph.c:1.2 Tue Aug 10 13:52:13 2010 +++ src/usr.sbin/hdaudioctl/graph.c Sat Jun 20 16:15:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: graph.c,v 1.2 2010/08/10 13:52:13 joerg Exp $ */ +/* $NetBSD: graph.c,v 1.2.24.1 2020/06/20 16:15:45 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -45,13 +45,6 @@ #include "hdaudioctl.h" -static const char *pin_devices[16] = { - "Line Out", "Speaker", "HP Out", "CD", - "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", - "Line In", "AUX", "Mic In", "Telephony", - "SPDIF In", "Digital In", "Reserved", "Other" -}; - int hdaudioctl_graph(int fd, int argc, char *argv[]) { Index: src/usr.sbin/hdaudioctl/hdaudioctl.8 diff -u src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6.4.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.8:1.6 Tue Mar 18 18:20:46 2014 +++ src/usr.sbin/hdaudioctl/hdaudioctl.8 Sat Jun 20 16:15:45 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: hdaudioctl.8,v 1.6 2014/03/18 18:20:46 riastradh Exp $ +.\" $NetBSD: hdaudioctl.8,v 1.6.4.1 2020/06/20 16:15:45 martin Exp $ .\" .\" Copyright (c) 2009 Precedence Technologies Ltd .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 6, 2009 +.Dd June 12, 2020 .Dt HDAUDIOCTL 8 .Os .Sh NAME @@ -55,6 +55,8 @@ Valid commands are: For each child codec of the chosen .Xr hdaudio 4 device, display the nid, vendor, product, subsystem and device IDs. +.It show +Retrieve and display the current codec configuration in human-readable form. .It get Ar codecid Ar nid Retrieve and display the current codec configuration as a .Xr proplib 3 Index: src/usr.sbin/hdaudioctl/hdaudioctl.c diff -u src/usr.sbin/hdaudioctl/hdaudioctl.c:1.1 src/usr.sbin/hdaudioctl/hdaudioctl.c:1.1.28.1 --- src/usr.sbin/hdaudioctl/hdaudioctl.c:1.1 Sun Oct 11 08:57:54 2009 +++ src/usr.sbin/hdaudioctl/hdaudioctl.c Sat Jun 20 16:15:45 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudioctl.c,v 1.1 2009/10/11 08:57:54 sborrill Exp $ */ +/* $NetBSD: hdaudioctl.c,v 1.1.28.1 2020/06/20 16:15:45 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -49,13 +49,54 @@ #define DEVPATH_HDAUDIO "/dev/hdaudio0" +const char *pin_devices[16] = { + "Line out", "Speaker", "Headphones", "CD", + "SPDIF Out", "Digital Out", "Modem Line", "Modem Handset", + "Line In", "AUX", "Mic In", "Telephony", + "SPDIF In", "Digital In", "Reserved", "Other" +}; +static const char *pin_jacks[16] = { + "Unknown", "1/8\"", "1/4\"", "ATAPI", + "RCA", "Optic", "Digital", "Analog", + "DIN", "XLR", "RJ-11", "Combo", + "0xC", "0xD", "0xE", "Other" +}; +static const char *pin_connections[4] = { + "Jack", "None", "Fixed", "Both" +}; +static const char *pin_colors[16] = { + "Unknown", "Black", "Grey", "Blue", + "Green", "Red", "Orange", "Yellow", + "Purple", "Pink", "Res. A", "Res. B", + "Res. C", "Res. D", "White", "Other" +}; +static const char *pin_locations[64] = { + "0x00", "Rear", "Front", "Left", + "Right", "Top", "Bottom", "Rear-panel", + "Drive-bay", "0x09", "0x0a", "0x0b", + "0x0c", "0x0d", "0x0e", "0x0f", + "Internal", "0x11", "0x12", "0x13", + "0x14", "0x15", "0x16", "Riser", + "0x18", "Onboard", "0x1a", "0x1b", + "0x1c", "0x1d", "0x1e", "0x1f", + "External", "Ext-Rear", "Ext-Front", "Ext-Left", + "Ext-Right", "Ext-Top", "Ext-Bottom", "0x07", + "0x28", "0x29", "0x2a", "0x2b", + "0x2c", "0x2d", "0x2e", "0x2f", + "Other", "0x31", "0x32", "0x33", + "0x34", "0x35", "Other-Bott", "Lid-In", + "Lid-Out", "0x39", "0x3a", "0x3b", + "0x3c", "0x3d", "0x3e", "0x3f" +}; + void usage(void) { const char *prog; prog = getprogname(); - + fprintf(stderr, "usage: %s [-f
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: bouyer Date: Tue Jun 16 10:36:03 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: tickets 1734, 1735 To generate a diff of this commit: cvs rdiff -u -r1.1.2.85 -r1.1.2.86 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.85 src/doc/CHANGES-7.3:1.1.2.86 --- src/doc/CHANGES-7.3:1.1.2.85 Sun Jun 7 16:46:01 2020 +++ src/doc/CHANGES-7.3 Tue Jun 16 10:36:03 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.85 2020/06/07 16:46:01 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.86 2020/06/16 10:36:03 bouyer Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -867,3 +867,16 @@ sys/dev/sysmon/sysmon_envsys.c 1.145 Do not queue sysmon refresh until the rndsource is attached. [riastradh, ticket #1733] +sys/dev/usb/if_otus.c1.45 via patch + + Stricter bounds check for some packet length we get from the usb chip, + to make sure we do not corrupt kernel memory. + Pointed out by Ilja Van Sprundel. + [martin, ticket #1734] + +sys/dev/usb/if_run.c1.41 + + Better bounds checking for oversized packets, to avoid kernel memory + corruption. Pointed out by Ilja Van Sprundel. + [martin, ticket #1735] +
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: bouyer Date: Tue Jun 16 10:34:49 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-7]: if_run.c Log Message: Pull up following revision(s) (requested by martin in ticket #1735): sys/dev/usb/if_run.c: revision 1.41 Better bounds checking for oversized packets, to avoid kernel memory corruption. Pointed out by Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.10.4.4 -r1.10.4.5 src/sys/dev/usb/if_run.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_run.c diff -u src/sys/dev/usb/if_run.c:1.10.4.4 src/sys/dev/usb/if_run.c:1.10.4.5 --- src/sys/dev/usb/if_run.c:1.10.4.4 Wed Aug 8 10:17:11 2018 +++ src/sys/dev/usb/if_run.c Tue Jun 16 10:34:49 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_run.c,v 1.10.4.4 2018/08/08 10:17:11 martin Exp $ */ +/* $NetBSD: if_run.c,v 1.10.4.5 2020/06/16 10:34:49 bouyer Exp $ */ /* $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */ /*- @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.10.4.4 2018/08/08 10:17:11 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.10.4.5 2020/06/16 10:34:49 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2067,7 +2067,8 @@ run_rx_frame(struct run_softc *sc, uint8 return; } if (len > MHLEN) { - MCLGET(m, M_DONTWAIT); + if (__predict_true(len <= MCLBYTES)) + MCLGET(m, M_DONTWAIT); if (__predict_false(!(m->m_flags & M_EXT))) { ifp->if_ierrors++; m_freem(m);
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: bouyer Date: Tue Jun 16 10:33:38 UTC 2020 Modified Files: src/sys/dev/usb [netbsd-7]: if_otus.c Log Message: Pull up following revision(s) (requested by martin in ticket #1734): sys/dev/usb/if_otus.c: revision 1.45 via patch Stricter bounds check for some packet length we get from the usb chip, to make sure we do not corrupt kernel memory. Pointed out by Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.25.4.3 -r1.25.4.4 src/sys/dev/usb/if_otus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/if_otus.c diff -u src/sys/dev/usb/if_otus.c:1.25.4.3 src/sys/dev/usb/if_otus.c:1.25.4.4 --- src/sys/dev/usb/if_otus.c:1.25.4.3 Wed Aug 8 10:17:11 2018 +++ src/sys/dev/usb/if_otus.c Tue Jun 16 10:33:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_otus.c,v 1.25.4.3 2018/08/08 10:17:11 martin Exp $ */ +/* $NetBSD: if_otus.c,v 1.25.4.4 2020/06/16 10:33:38 bouyer Exp $ */ /* $OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $ */ /*- @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.25.4.3 2018/08/08 10:17:11 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.25.4.4 2020/06/16 10:33:38 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1750,6 +1750,10 @@ otus_sub_rxeof(struct otus_softc *sc, ui } /* Compute MPDU's length. */ mlen = len - AR_PLCP_HDR_LEN - sizeof(*tail); + if (__predict_false(mlen < IEEE80211_CRC_LEN)) { + ifp->if_ierrors++; + return; + } mlen -= IEEE80211_CRC_LEN; /* strip 802.11 FCS */ /* Make sure there's room for an 802.11 header. */ /* @@ -1770,7 +1774,8 @@ otus_sub_rxeof(struct otus_softc *sc, ui return; } if (align + mlen > MHLEN) { - MCLGET(m, M_DONTWAIT); + if (__predict_true(align + mlen <= MCLBYTES)) + MCLGET(m, M_DONTWAIT); if (__predict_false(!(m->m_flags & M_EXT))) { ifp->if_ierrors++; m_freem(m);
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sun Jun 7 16:46:01 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1732 and #1733 To generate a diff of this commit: cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.84 src/doc/CHANGES-7.3:1.1.2.85 --- src/doc/CHANGES-7.3:1.1.2.84 Thu May 7 12:09:26 2020 +++ src/doc/CHANGES-7.3 Sun Jun 7 16:46:01 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.84 2020/05/07 12:09:26 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.85 2020/06/07 16:46:01 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -857,3 +857,13 @@ bin/rcp/rcp.c 1.50 further files or directories to be ignored or corrupted. [aymeric, ticket #1731] +sys/arch/powerpc/oea/pmap.c 1.96 + + Fix inconsistent KERNEL_LOCK state in pmap for powerpc/oea. + [rin, ticket #1732] + +sys/dev/sysmon/sysmon_envsys.c 1.145 + + Do not queue sysmon refresh until the rndsource is attached. + [riastradh, ticket #1733] +
CVS commit: [netbsd-7] src/sys/dev/sysmon
Module Name:src Committed By: martin Date: Sun Jun 7 16:43:40 UTC 2020 Modified Files: src/sys/dev/sysmon [netbsd-7]: sysmon_envsys.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1733): sys/dev/sysmon/sysmon_envsys.c: revision 1.145 Don't queue sysmon refresh until the rndsource is attached. Using the rndsource, as refreshing the sensors will do, is not allowed until _after_ rnd_source_attach. XXX pullup-7 XXX pullup-8 XXX pullup-9 To generate a diff of this commit: cvs rdiff -u -r1.127.2.3 -r1.127.2.4 src/sys/dev/sysmon/sysmon_envsys.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.3 src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.4 --- src/sys/dev/sysmon/sysmon_envsys.c:1.127.2.3 Tue Oct 24 09:25:26 2017 +++ src/sys/dev/sysmon/sysmon_envsys.c Sun Jun 7 16:43:40 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.127.2.3 2017/10/24 09:25:26 snj Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.127.2.4 2020/06/07 16:43:40 martin Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.3 2017/10/24 09:25:26 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.127.2.4 2020/06/07 16:43:40 martin Exp $"); #include #include @@ -765,16 +765,6 @@ out: nevent = 0; sysmon_task_queue_init(); - if (sme->sme_flags & SME_INIT_REFRESH) { - sysmon_task_queue_sched(0, sme_initial_refresh, sme); - DPRINTF(("%s: scheduled initial refresh for '%s'\n", -__func__, sme->sme_name)); - } - SLIST_FOREACH(evdv, _evdrv_list, evdrv_head) { - sysmon_task_queue_sched(0, - sme_event_drvadd, evdv->evdrv); - nevent++; - } /* * Hook the sensor into rnd(4) entropy pool if requested */ @@ -830,6 +820,17 @@ out: rnd_type, rnd_flag); } } + + if (sme->sme_flags & SME_INIT_REFRESH) { + sysmon_task_queue_sched(0, sme_initial_refresh, sme); + DPRINTF(("%s: scheduled initial refresh for '%s'\n", +__func__, sme->sme_name)); + } + SLIST_FOREACH(evdv, _evdrv_list, evdrv_head) { + sysmon_task_queue_sched(0, + sme_event_drvadd, evdv->evdrv); + nevent++; + } DPRINTF(("%s: driver '%s' registered (nsens=%d nevent=%d)\n", __func__, sme->sme_name, sme->sme_nsensors, nevent)); }
CVS commit: [netbsd-7] src/sys/arch/powerpc/oea
Module Name:src Committed By: martin Date: Sun Jun 7 12:26:22 UTC 2020 Modified Files: src/sys/arch/powerpc/oea [netbsd-7]: pmap.c Log Message: Pull up following revision(s) (requested by rin in ticket #1732): sys/arch/powerpc/oea/pmap.c: revision 1.96 Stop returning while PMAP_LOCK() (= KERNEL_LOCK(1, NULL)) is held. Kernel freeze with heavy load is significantly mitigated (fixed?), in which I could not even enter DDB from console. XXX There is still inconsistency in usage of two PVO pools. I will send-pr later. XXX pullup to netbsd-[987] To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.92.2.1 src/sys/arch/powerpc/oea/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.92 src/sys/arch/powerpc/oea/pmap.c:1.92.2.1 --- src/sys/arch/powerpc/oea/pmap.c:1.92 Sun Aug 10 17:49:04 2014 +++ src/sys/arch/powerpc/oea/pmap.c Sun Jun 7 12:26:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.92 2014/08/10 17:49:04 joerg Exp $ */ +/* $NetBSD: pmap.c,v 1.92.2.1 2020/06/07 12:26:22 martin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92 2014/08/10 17:49:04 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.92.2.1 2020/06/07 12:26:22 martin Exp $"); #define PMAP_NOOPNAMES @@ -990,6 +990,7 @@ pmap_pte_spill(struct pmap *pm, vaddr_t } source_pvo = pvo; if (exec && !PVO_EXECUTABLE_P(source_pvo)) { +PMAP_UNLOCK(); return 0; } if (victim_pvo != NULL) @@ -2153,6 +2154,7 @@ pmap_extract(pmap_t pm, vaddr_t va, padd return true; } } + PMAP_UNLOCK(); return false; #elif defined (PMAP_OEA64_BRIDGE) if (va >= SEGMENT_LENGTH)
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Thu May 7 12:09:26 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Whitespace fix To generate a diff of this commit: cvs rdiff -u -r1.1.2.83 -r1.1.2.84 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.83 src/doc/CHANGES-7.3:1.1.2.84 --- src/doc/CHANGES-7.3:1.1.2.83 Thu May 7 12:01:40 2020 +++ src/doc/CHANGES-7.3 Thu May 7 12:09:26 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.83 2020/05/07 12:01:40 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.84 2020/05/07 12:09:26 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -850,7 +850,7 @@ external/bsd/bind/dist/lib/isc/sha2.c ( converting the code to avoid alignment issues. [he, ticket #1730] -bin/rcp/rcp.c 1.50 +bin/rcp/rcp.c 1.50 In sink(), upon error, avoid multiple replies to the source as this would lead to a desynchronization of the protocol and
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Thu May 7 12:01:40 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1731 To generate a diff of this commit: cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.82 src/doc/CHANGES-7.3:1.1.2.83 --- src/doc/CHANGES-7.3:1.1.2.82 Wed May 6 07:42:14 2020 +++ src/doc/CHANGES-7.3 Thu May 7 12:01:40 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.82 2020/05/06 07:42:14 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.83 2020/05/07 12:01:40 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -850,3 +850,10 @@ external/bsd/bind/dist/lib/isc/sha2.c ( converting the code to avoid alignment issues. [he, ticket #1730] +bin/rcp/rcp.c 1.50 + + In sink(), upon error, avoid multiple replies to the source + as this would lead to a desynchronization of the protocol and + further files or directories to be ignored or corrupted. + [aymeric, ticket #1731] +
CVS commit: [netbsd-7] src/bin/rcp
Module Name:src Committed By: sborrill Date: Thu May 7 12:01:00 UTC 2020 Modified Files: src/bin/rcp [netbsd-7]: rcp.c Log Message: Pull up the following revisions(s) (requested by aymeric in ticket #1731): bin/rcp/rcp.c: revision 1.50 In sink(), upon error, avoid multiple replies to the source as this would lead to a desynchronization of the protocol and further files or directories to be ignored or corrupted. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.49.12.1 src/bin/rcp/rcp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/rcp/rcp.c diff -u src/bin/rcp/rcp.c:1.49 src/bin/rcp/rcp.c:1.49.12.1 --- src/bin/rcp/rcp.c:1.49 Mon May 7 15:22:54 2012 +++ src/bin/rcp/rcp.c Thu May 7 12:01:00 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rcp.c,v 1.49 2012/05/07 15:22:54 chs Exp $ */ +/* $NetBSD: rcp.c,v 1.49.12.1 2020/05/07 12:01:00 sborrill Exp $ */ /* * Copyright (c) 1983, 1990, 1992, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)rcp.c 8.2 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: rcp.c,v 1.49 2012/05/07 15:22:54 chs Exp $"); +__RCSID("$NetBSD: rcp.c,v 1.49.12.1 2020/05/07 12:01:00 sborrill Exp $"); #endif #endif /* not lint */ @@ -470,7 +470,6 @@ sink(int argc, char *argv[]) static BUF buffer; struct stat stb; struct timeval tv[2]; - enum { YES, NO, DISPLAYED } wrerr; BUF *bp; ssize_t j; off_t i; @@ -480,8 +479,9 @@ sink(int argc, char *argv[]) mode_t mask; mode_t mode; mode_t omode; - int setimes, targisdir; + int setimes, targisdir, wrerr; int wrerrno = 0; /* pacify gcc */ + const char *wrcontext = NULL; char ch, *cp, *np, *targ, *vect[1], buf[BUFSIZ]; const char *why; off_t size; @@ -624,9 +624,7 @@ sink(int argc, char *argv[]) sink(1, vect); if (setimes) { setimes = 0; -if (utimes(np, tv) < 0) -run_err("%s: set times: %s", - np, strerror(errno)); +(void) utimes(np, tv); } if (mod_flag) (void)chmod(np, mode); @@ -644,7 +642,20 @@ bad: run_err("%s: %s", np, strerror(er continue; } cp = bp->buf; - wrerr = NO; + wrerr = 0; + +/* + * Like run_err(), but don't send any message to the remote end. + * Instead, record the first error and send that in the end. + */ +#define RUN_ERR(w_context) do { \ + if (!wrerr) { \ + wrerrno = errno; \ + wrcontext = w_context; \ + wrerr = 1; \ + }\ +} while(0) + count = 0; for (i = 0; i < size; i += BUFSIZ) { amt = BUFSIZ; @@ -663,69 +674,56 @@ bad: run_err("%s: %s", np, strerror(er } while (amt > 0); if (count == bp->cnt) { /* Keep reading so we stay sync'd up. */ -if (wrerr == NO) { +if (!wrerr) { j = write(ofd, bp->buf, (size_t)count); if (j != count) { - wrerr = YES; - wrerrno = j >= 0 ? EIO : errno; + if (j >= 0) + errno = EIO; + RUN_ERR("write"); } } count = 0; cp = bp->buf; } } - if (count != 0 && wrerr == NO && + if (count != 0 && !wrerr && (j = write(ofd, bp->buf, (size_t)count)) != count) { - wrerr = YES; - wrerrno = j >= 0 ? EIO : errno; - } - if (ftruncate(ofd, size)) { - run_err("%s: truncate: %s", np, strerror(errno)); - wrerr = DISPLAYED; + if (j >= 0) +errno = EIO; + RUN_ERR("write"); } + if (ftruncate(ofd, size)) + RUN_ERR("truncate"); + if (pflag) { if (exists || omode != mode) if (fchmod(ofd, omode)) - run_err("%s: set mode: %s", - np, strerror(errno)); + RUN_ERR("set mode"); } else { if (!exists && omode != mode) if (fchmod(ofd, omode & ~mask)) - run_err("%s: set mode: %s", - np, strerror(errno)); + RUN_ERR("set mode"); } #ifndef __SVR4 - if (setimes && wrerr == NO) { + if (setimes && !wrerr) { setimes = 0; - if (futimes(ofd, tv) < 0) { -run_err("%s: set times: %s", -np, strerror(errno)); -wrerr = DISPLAYED; - } + if (futimes(ofd, tv) < 0) +RUN_ERR("set times"); } #endif (void)close(ofd); #ifdef __SVR4 - if (setimes && wrerr == NO) { + if (setimes && !wrerr) { setimes = 0; - if (utimes(np, tv) < 0) { -run_err("%s: set times: %s", -np, strerror(errno)); -wrerr = DISPLAYED; - } + if (utimes(np, tv) < 0) +RUN_ERR("set times"); } #endif (void)response(); - switch(wrerr) { - case YES: - run_err("%s: write: %s", np, strerror(wrerrno)); - break; - case NO: + if (wrerr) + run_err("%s: %s: %s", np, wrcontext, strerror(wrerrno)); + else (void)write(rem, "", 1); - break; - case DISPLAYED: - break; - } } out:
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Wed May 6 07:42:14 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1730 To generate a diff of this commit: cvs rdiff -u -r1.1.2.81 -r1.1.2.82 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.81 src/doc/CHANGES-7.3:1.1.2.82 --- src/doc/CHANGES-7.3:1.1.2.81 Thu Apr 30 16:23:32 2020 +++ src/doc/CHANGES-7.3 Wed May 6 07:42:14 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.81 2020/04/30 16:23:32 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.82 2020/05/06 07:42:14 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -844,3 +844,9 @@ games/fortune/unstr/unstr.c 1.15 Fix potential buffer overflows in fortune tools. [nia, ticket #1729] +external/bsd/bind/dist/lib/isc/sha2.c (apply patch) + + Fix bug in sha384 checksum computation introduced when + converting the code to avoid alignment issues. + [he, ticket #1730] +
CVS commit: [netbsd-7] src/external/bsd/bind/dist/lib/isc
Module Name:src Committed By: sborrill Date: Wed May 6 07:40:17 UTC 2020 Modified Files: src/external/bsd/bind/dist/lib/isc [netbsd-7]: sha2.c Log Message: Fix bug in sha384 checksum computation introduced when converting the code to avoid alignment issues. To generate a diff of this commit: cvs rdiff -u -r1.8.2.2 -r1.8.2.3 src/external/bsd/bind/dist/lib/isc/sha2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/dist/lib/isc/sha2.c diff -u src/external/bsd/bind/dist/lib/isc/sha2.c:1.8.2.2 src/external/bsd/bind/dist/lib/isc/sha2.c:1.8.2.3 --- src/external/bsd/bind/dist/lib/isc/sha2.c:1.8.2.2 Tue Jun 20 17:09:53 2017 +++ src/external/bsd/bind/dist/lib/isc/sha2.c Wed May 6 07:40:17 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: sha2.c,v 1.8.2.2 2017/06/20 17:09:53 snj Exp $ */ +/* $NetBSD: sha2.c,v 1.8.2.3 2020/05/06 07:40:17 sborrill Exp $ */ /* * Copyright (C) 2005-2007, 2009, 2011, 2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC") @@ -1503,6 +1503,8 @@ void isc_sha512_last(isc_sha512_t *conte *context->buffer = 0x80; } /* Store the length of input data (in bits): */ + memcpy(>buffer[ISC_SHA512_SHORT_BLOCK_LENGTH], + >bitcount[1], sizeof(isc_uint64_t)); memcpy(>buffer[ISC_SHA512_SHORT_BLOCK_LENGTH+8], >bitcount[0], sizeof(isc_uint64_t));
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Apr 30 16:23:32 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1729 To generate a diff of this commit: cvs rdiff -u -r1.1.2.80 -r1.1.2.81 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.80 src/doc/CHANGES-7.3:1.1.2.81 --- src/doc/CHANGES-7.3:1.1.2.80 Thu Apr 23 14:18:09 2020 +++ src/doc/CHANGES-7.3 Thu Apr 30 16:23:32 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.80 2020/04/23 14:18:09 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.81 2020/04/30 16:23:32 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -838,3 +838,9 @@ external/bsd/bind/include/config.h (app This should make DNSSEC work on such hosts as well. [he, ticket #1728] +games/fortune/strfile/strfile.c 1.39 +games/fortune/unstr/unstr.c 1.15 + + Fix potential buffer overflows in fortune tools. + [nia, ticket #1729] +
CVS commit: [netbsd-7] src/games/fortune
Module Name:src Committed By: martin Date: Thu Apr 30 16:22:59 UTC 2020 Modified Files: src/games/fortune/strfile [netbsd-7]: strfile.c src/games/fortune/unstr [netbsd-7]: unstr.c Log Message: Pull up following revision(s) (requested by nia in ticket #1729): games/fortune/strfile/strfile.c: revision 1.39 games/fortune/unstr/unstr.c: revision 1.15 strfile: Check that input/output filenames don't exceed the buffer size unstr: Check that the input filename fits in the buffer. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.38.4.1 src/games/fortune/strfile/strfile.c cvs rdiff -u -r1.14 -r1.14.10.1 src/games/fortune/unstr/unstr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/strfile/strfile.c diff -u src/games/fortune/strfile/strfile.c:1.38 src/games/fortune/strfile/strfile.c:1.38.4.1 --- src/games/fortune/strfile/strfile.c:1.38 Thu Sep 19 00:34:00 2013 +++ src/games/fortune/strfile/strfile.c Thu Apr 30 16:22:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.38 2013/09/19 00:34:00 uwe Exp $ */ +/* $NetBSD: strfile.c,v 1.38.4.1 2020/04/30 16:22:59 martin Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19 #if 0 static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: strfile.c,v 1.38 2013/09/19 00:34:00 uwe Exp $"); +__RCSID("$NetBSD: strfile.c,v 1.38.4.1 2020/04/30 16:22:59 martin Exp $"); #endif #endif /* not lint */ #endif /* __NetBSD__ */ @@ -267,6 +267,7 @@ getargs(int argc, char **argv) int ch; extern int optind; extern char *optarg; + size_t len; while ((ch = getopt(argc, argv, "c:iorsx")) != -1) switch(ch) { @@ -300,14 +301,25 @@ getargs(int argc, char **argv) if (*argv) { Infile = *argv; - if (*++argv) - (void) strcpy(Outfile, *argv); + if (*++argv) { + len = strlen(*argv); + if (len >= sizeof(Outfile)) { +puts("Bad output filename"); +usage(); + } + (void) memcpy(Outfile, *argv, len + 1); + } } if (!Infile) { puts("No input file name"); usage(); } if (*Outfile == '\0') { + len = strlen(Infile) + sizeof(".dat"); + if (len > sizeof(Outfile)) { + puts("Bad input filename"); + usage(); + } (void) strcpy(Outfile, Infile); (void) strcat(Outfile, ".dat"); } Index: src/games/fortune/unstr/unstr.c diff -u src/games/fortune/unstr/unstr.c:1.14 src/games/fortune/unstr/unstr.c:1.14.10.1 --- src/games/fortune/unstr/unstr.c:1.14 Tue Jun 19 05:46:08 2012 +++ src/games/fortune/unstr/unstr.c Thu Apr 30 16:22:59 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: unstr.c,v 1.14 2012/06/19 05:46:08 dholland Exp $ */ +/* $NetBSD: unstr.c,v 1.14.10.1 2020/04/30 16:22:59 martin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 19 #if 0 static char sccsid[] = "@(#)unstr.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: unstr.c,v 1.14 2012/06/19 05:46:08 dholland Exp $"); +__RCSID("$NetBSD: unstr.c,v 1.14.10.1 2020/04/30 16:22:59 martin Exp $"); #endif #endif /* not lint */ @@ -114,7 +114,7 @@ main(int ac __unused, char **av) void getargs(char *av[]) { - if (!*++av) { + if (!*++av || (strlen(*av) + sizeof(".dat")) > sizeof(Datafile)) { (void) fprintf(stderr, "usage: unstr datafile\n"); exit(1); }
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Apr 23 14:18:09 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1728 To generate a diff of this commit: cvs rdiff -u -r1.1.2.79 -r1.1.2.80 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.79 src/doc/CHANGES-7.3:1.1.2.80 --- src/doc/CHANGES-7.3:1.1.2.79 Wed Apr 15 14:52:56 2020 +++ src/doc/CHANGES-7.3 Thu Apr 23 14:18:09 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.79 2020/04/15 14:52:56 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.80 2020/04/23 14:18:09 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -832,3 +832,9 @@ sys/netinet6/nd6_rtr.c1.148 (via pat PR kern/55091 and PR bin/54997: fix default route selection. [kim, ticket #1727] +external/bsd/bind/include/config.h (apply patch) + + Fix BIND configuration for big-endian hosts. + This should make DNSSEC work on such hosts as well. + [he, ticket #1728] +
CVS commit: [netbsd-7] src/external/bsd/bind/include
Module Name:src Committed By: martin Date: Thu Apr 23 14:16:01 UTC 2020 Modified Files: src/external/bsd/bind/include [netbsd-7]: config.h Log Message: Apply patch, requested by he in ticket #1728: src/external/bsd/bind/include/config.h (apply patch) Fix BIND configuration for big-endian hosts. This should make DNSSEC work on such hosts as well. To generate a diff of this commit: cvs rdiff -u -r1.14.2.6 -r1.14.2.7 src/external/bsd/bind/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bind/include/config.h diff -u src/external/bsd/bind/include/config.h:1.14.2.6 src/external/bsd/bind/include/config.h:1.14.2.7 --- src/external/bsd/bind/include/config.h:1.14.2.6 Tue Jun 20 17:09:58 2017 +++ src/external/bsd/bind/include/config.h Thu Apr 23 14:16:01 2020 @@ -594,6 +594,11 @@ int sigwait(const unsigned int *set, int /* # undef WORDS_BIGENDIAN */ # endif #endif +#else /* __NetBSD__ */ +# include +# if _BYTE_ORDER == _BIG_ENDIAN +# define WORDS_BIGENDIAN 1 +# endif #endif /* Define to empty if `const' does not conform to ANSI C. */
CVS commit: [netbsd-7] src/sys/netinet6
Module Name:src Committed By: martin Date: Wed Apr 15 14:52:29 UTC 2020 Modified Files: src/sys/netinet6 [netbsd-7]: nd6_rtr.c Log Message: Pull up following revision(s) (requested by kim in ticket #1727): sys/netinet6/nd6_rtr.c: revision 1.148 (via patch) Fix default route selection The primary issue was that in revision 1.79 a check was added in the nd6_defrouter_select() search loop to ignore the entry if RA processing is enabled on its interface. In practice this results in all entries being ignored. This fix reverses the condition, so that an entry is ignored when RA processing is NOT enabled on its interface. Further, the entry is only ignored for being selected as the default router. The currently installed router must be identified regardless of the (current) status of its interface, so that we can delete the route before installing a new one. I also added error logging when adding or deleting a route fails. This should help the administrator (or kernel developer) in noticing possible problems. Finally, if deleting a route fails, the corresponding default route entry no longer has its "installed" flag cleared, so that deletion will be retried. At a minimum, this will cause repeated messages about the failed deletion as opposed to only getting repeated messages about the installation of a new default route failing. Fixes PR kern/55091 and also PR bin/54997 as far as the behaviour observed with ndp(8). To generate a diff of this commit: cvs rdiff -u -r1.93.2.3 -r1.93.2.4 src/sys/netinet6/nd6_rtr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_rtr.c diff -u src/sys/netinet6/nd6_rtr.c:1.93.2.3 src/sys/netinet6/nd6_rtr.c:1.93.2.4 --- src/sys/netinet6/nd6_rtr.c:1.93.2.3 Sat May 2 18:23:25 2015 +++ src/sys/netinet6/nd6_rtr.c Wed Apr 15 14:52:28 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.93.2.3 2015/05/02 18:23:25 martin Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.93.2.4 2020/04/15 14:52:28 martin Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.93.2.3 2015/05/02 18:23:25 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.93.2.4 2020/04/15 14:52:28 martin Exp $"); #include #include @@ -472,6 +472,10 @@ defrouter_addreq(struct nd_defrouter *ne } if (error == 0) new->installed = 1; + else + log(LOG_ERR, "defrouter_addreq: " + "error %d adding default router %s on %s\n", + error, ip6_sprintf(>rtaddr), new->ifp->if_xname); splx(s); return; } @@ -559,6 +563,7 @@ defrouter_delreq(struct nd_defrouter *dr struct sockaddr sa; } def, mask, gw; struct rtentry *oldrt = NULL; + int error; #ifdef DIAGNOSTIC if (dr == NULL) @@ -577,7 +582,7 @@ defrouter_delreq(struct nd_defrouter *dr gw.sin6.sin6_scope_id = 0; /* XXX */ #endif - rtrequest(RTM_DELETE, , , , RTF_GATEWAY, ); + error = rtrequest(RTM_DELETE, , , , RTF_GATEWAY, ); if (oldrt) { nd6_rtmsg(RTM_DELETE, oldrt); if (oldrt->rt_refcnt <= 0) { @@ -591,7 +596,12 @@ defrouter_delreq(struct nd_defrouter *dr } } - dr->installed = 0; + if (error == 0) + dr->installed = 0; + else + log(LOG_ERR, "defrouter_delreq: " + "error %d deleting default router %s on %s\n", + error, ip6_sprintf(>rtaddr), dr->ifp->if_xname); } /* @@ -672,8 +682,16 @@ defrouter_select(void) */ for (dr = TAILQ_FIRST(_defrouter); dr; dr = TAILQ_NEXT(dr, dr_entry)) { + if (dr->installed && !installed_dr) + installed_dr = dr; + else if (dr->installed && installed_dr) { + /* this should not happen. warn for diagnosis. */ + log(LOG_ERR, "defrouter_select: more than one router" + " is installed\n"); + } + ndi = ND_IFINFO(dr->ifp); - if (nd6_accepts_rtadv(ndi)) + if (!nd6_accepts_rtadv(ndi)) continue; if (selected_dr == NULL && @@ -682,14 +700,6 @@ defrouter_select(void) ND6_IS_LLINFO_PROBREACH(ln)) { selected_dr = dr; } - - if (dr->installed && !installed_dr) - installed_dr = dr; - else if (dr->installed && installed_dr) { - /* this should not happen. warn for diagnosis. */ - log(LOG_ERR, "defrouter_select: more than one router" - " is installed\n"); - } } /* * If none of the default routers was found to be reachable,
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Apr 15 14:52:56 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1727 To generate a diff of this commit: cvs rdiff -u -r1.1.2.78 -r1.1.2.79 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.78 src/doc/CHANGES-7.3:1.1.2.79 --- src/doc/CHANGES-7.3:1.1.2.78 Mon Mar 16 12:09:46 2020 +++ src/doc/CHANGES-7.3 Wed Apr 15 14:52:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.78 2020/03/16 12:09:46 sborrill Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.79 2020/04/15 14:52:56 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -827,3 +827,8 @@ sys/arch/xen/xen/xennet_checksum.c 1.4 on same physical host as it seems Windows does some padding. [jdolecek, ticket #1726] +sys/netinet6/nd6_rtr.c1.148 (via patch) + + PR kern/55091 and PR bin/54997: fix default route selection. + [kim, ticket #1727] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: sborrill Date: Mon Mar 16 12:09:46 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1726 To generate a diff of this commit: cvs rdiff -u -r1.1.2.77 -r1.1.2.78 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.77 src/doc/CHANGES-7.3:1.1.2.78 --- src/doc/CHANGES-7.3:1.1.2.77 Sun Mar 8 09:20:52 2020 +++ src/doc/CHANGES-7.3 Mon Mar 16 12:09:46 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.77 2020/03/08 09:20:52 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.78 2020/03/16 12:09:46 sborrill Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -819,3 +819,11 @@ sys/arch/amigappc/include/bus_defs.h 1. the bus methods since we already define them anyway. [is, ticket #1725] +sys/arch/xen/xen/xennet_checksum.c 1.4 + + Make the packet length check less strict, allow the physical + packet longer than IP payload. This fixes problem where checksum + was not recomputed for short packets coming from Windows domU + on same physical host as it seems Windows does some padding. + [jdolecek, ticket #1726] +
CVS commit: [netbsd-7] src/sys/arch/xen/xen
Module Name:src Committed By: sborrill Date: Mon Mar 16 12:08:37 UTC 2020 Modified Files: src/sys/arch/xen/xen [netbsd-7]: xennet_checksum.c Log Message: Pull up the following revisions(s) (requested by jdolecek in ticket #1726): sys/arch/xen/xen/xennet_checksum.c: revision 1.4 Make the packet length check less strict, allow the physical packet longer than IP payload. This fixes problem where checksum was not recomputed for short packets coming from Windows domU on same physical host as it seems Windows does some padding. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.80.1 src/sys/arch/xen/xen/xennet_checksum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/xen/xen/xennet_checksum.c diff -u src/sys/arch/xen/xen/xennet_checksum.c:1.3 src/sys/arch/xen/xen/xennet_checksum.c:1.3.80.1 --- src/sys/arch/xen/xen/xennet_checksum.c:1.3 Thu Nov 22 16:17:10 2007 +++ src/sys/arch/xen/xen/xennet_checksum.c Mon Mar 16 12:08:37 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: xennet_checksum.c,v 1.3 2007/11/22 16:17:10 bouyer Exp $ */ +/* $NetBSD: xennet_checksum.c,v 1.3.80.1 2020/03/16 12:08:37 sborrill Exp $ */ /*- * Copyright (c)2006 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.3 2007/11/22 16:17:10 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xennet_checksum.c,v 1.3.80.1 2020/03/16 12:08:37 sborrill Exp $"); #include #include @@ -124,7 +124,7 @@ xennet_checksum_fill(struct mbuf **mp) nxt = iph->ip_p; iphlen = iph->ip_hl * 4; iplen = ntohs(iph->ip_len); - if (ehlen + iplen != m->m_pkthdr.len) { + if (ehlen + iplen > m->m_pkthdr.len) { return EINVAL; } if (nxt == IPPROTO_UDP) {
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sun Mar 8 09:20:52 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1723 - #1725 To generate a diff of this commit: cvs rdiff -u -r1.1.2.76 -r1.1.2.77 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.76 src/doc/CHANGES-7.3:1.1.2.77 --- src/doc/CHANGES-7.3:1.1.2.76 Wed Feb 12 20:21:12 2020 +++ src/doc/CHANGES-7.3 Sun Mar 8 09:20:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.76 2020/02/12 20:21:12 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.77 2020/03/08 09:20:52 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -802,3 +802,20 @@ external/bsd/ppp/dist/pppd/eap.c 1.5 pppd: Fix bounds check in EAP code [christos, ticket #1722] +sys/dev/ic/tms320av110.c 1.24 + + Remove unused variables. + [is, ticket #1723] + +sys/arch/amiga/dev/gayle_pcmcia.c 1.32 + + The Gayle interface uses swapped (little-endian) word accesses, so we + need to use the amiga_bus_stride_1swap methods for the word accesses. + [is, ticket #1724] + +sys/arch/amigappc/include/bus_defs.h 1.8 + + Gayle wants stride_1swap now, so declare the rest of + the bus methods since we already define them anyway. + [is, ticket #1725] +
CVS commit: [netbsd-7] src/sys/arch/amigappc/include
Module Name:src Committed By: martin Date: Sun Mar 8 09:19:55 UTC 2020 Modified Files: src/sys/arch/amigappc/include [netbsd-7]: bus_defs.h Log Message: Pull up following revision(s) (requested by is in ticket #1725): sys/arch/amigappc/include/bus_defs.h: revision 1.8 gayle wants stride_1swap now, so declare the rest of the bus methods since we already define them anyway. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/arch/amigappc/include/bus_defs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amigappc/include/bus_defs.h diff -u src/sys/arch/amigappc/include/bus_defs.h:1.6 src/sys/arch/amigappc/include/bus_defs.h:1.6.4.1 --- src/sys/arch/amigappc/include/bus_defs.h:1.6 Wed Jan 22 00:24:53 2014 +++ src/sys/arch/amigappc/include/bus_defs.h Sun Mar 8 09:19:55 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_defs.h,v 1.6 2014/01/22 00:24:53 christos Exp $ */ +/* $NetBSD: bus_defs.h,v 1.6.4.1 2020/03/08 09:19:55 martin Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -171,10 +171,13 @@ struct amiga_bus_space_methods { #define __BUS_SPACE_HAS_STREAM_METHODS extern const struct amiga_bus_space_methods amiga_bus_stride_1; +extern const struct amiga_bus_space_methods amiga_bus_stride_1swap; +extern const struct amiga_bus_space_methods amiga_bus_stride_1swap_abs; extern const struct amiga_bus_space_methods amiga_bus_stride_2; extern const struct amiga_bus_space_methods amiga_bus_stride_4; extern const struct amiga_bus_space_methods amiga_bus_stride_4swap; extern const struct amiga_bus_space_methods amiga_bus_stride_16; extern const struct amiga_bus_space_methods amiga_bus_stride_0x1000; +extern const struct amiga_bus_space_methods amiga_bus_stride_0x4000; #endif /* _AMIGAPPC_BUS_DEFS_H_ */
CVS commit: [netbsd-7] src/sys/arch/amiga/dev
Module Name:src Committed By: martin Date: Sun Mar 8 09:18:34 UTC 2020 Modified Files: src/sys/arch/amiga/dev [netbsd-7]: gayle_pcmcia.c Log Message: Pull up following revision(s) (requested by is in ticket #1724): sys/arch/amiga/dev/gayle_pcmcia.c: revision 1.32 The Gayle interface uses swapped (little-endian) word accesses, so we need to use the amiga_bus_stride_1swap methods for the word accesses. Analyzed and submitted via port-amiga@ by Martin �berg. Tested on formerly working hardware - by Jukka Andberg with Dlink DE-660+ (ne) - by Frank Willewith D-Link DFE-670TXD (ne) Tested on formerly not working hardware: - by Martin with 3Com 3c589 Etherling III (ep) - by Martin and Frank with CompactFlash cards (wdc) To generate a diff of this commit: cvs rdiff -u -r1.29.4.2 -r1.29.4.3 src/sys/arch/amiga/dev/gayle_pcmcia.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/dev/gayle_pcmcia.c diff -u src/sys/arch/amiga/dev/gayle_pcmcia.c:1.29.4.2 src/sys/arch/amiga/dev/gayle_pcmcia.c:1.29.4.3 --- src/sys/arch/amiga/dev/gayle_pcmcia.c:1.29.4.2 Mon Feb 16 12:48:32 2015 +++ src/sys/arch/amiga/dev/gayle_pcmcia.c Sun Mar 8 09:18:34 2020 @@ -1,9 +1,9 @@ -/* $NetBSD: gayle_pcmcia.c,v 1.29.4.2 2015/02/16 12:48:32 martin Exp $ */ +/* $NetBSD: gayle_pcmcia.c,v 1.29.4.3 2020/03/08 09:18:34 martin Exp $ */ /* public domain */ #include -__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.29.4.2 2015/02/16 12:48:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.29.4.3 2020/03/08 09:18:34 martin Exp $"); /* PCMCIA front-end driver for A1200's and A600's. */ @@ -131,7 +131,7 @@ pccard_attach(device_t parent, device_t pmap_update(vm_map_pmap(kernel_map)); /* override the one-byte access methods for I/O space */ - pcmio_bs_methods = amiga_bus_stride_1; + pcmio_bs_methods = amiga_bus_stride_1swap; pcmio_bs_methods.bsr1 = pcmio_bsr1; pcmio_bs_methods.bsw1 = pcmio_bsw1; pcmio_bs_methods.bsrm1 = pcmio_bsrm1;
CVS commit: [netbsd-7] src/sys/dev/ic
Module Name:src Committed By: martin Date: Sun Mar 8 09:15:34 UTC 2020 Modified Files: src/sys/dev/ic [netbsd-7]: tms320av110.c Log Message: Pull up following revision(s) (requested by is in ticket #1723): sys/dev/ic/tms320av110.c: revision 1.24 Make it compilable (remove unused variables). To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.23.12.1 src/sys/dev/ic/tms320av110.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/tms320av110.c diff -u src/sys/dev/ic/tms320av110.c:1.23 src/sys/dev/ic/tms320av110.c:1.23.12.1 --- src/sys/dev/ic/tms320av110.c:1.23 Sat Oct 27 17:18:23 2012 +++ src/sys/dev/ic/tms320av110.c Sun Mar 8 09:15:34 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: tms320av110.c,v 1.23 2012/10/27 17:18:23 chs Exp $ */ +/* $NetBSD: tms320av110.c,v 1.23.12.1 2020/03/08 09:15:34 martin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.23 2012/10/27 17:18:23 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tms320av110.c,v 1.23.12.1 2020/03/08 09:15:34 martin Exp $"); #include #include @@ -251,9 +251,7 @@ tav_drain(void *hdl) int tav_query_encoding(void *hdl, struct audio_encoding *ae) { - struct tav_softc *sc; - sc = hdl; if (ae->index >= sizeof(tav_encodings)/sizeof(*ae)) return EINVAL; @@ -473,9 +471,7 @@ tav_set_params(void *hdl, int setmode, i int tav_set_port(void *hdl, mixer_ctrl_t *mc) { - struct tav_softc *sc; - sc = hdl; /* dummy */ return 0; } @@ -483,9 +479,7 @@ tav_set_port(void *hdl, mixer_ctrl_t *mc int tav_get_port(void *hdl, mixer_ctrl_t *mc) { - struct tav_softc *sc; - sc = hdl; /* dummy */ return 0; }
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Feb 12 20:21:12 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1721 and #1722 To generate a diff of this commit: cvs rdiff -u -r1.1.2.75 -r1.1.2.76 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.75 src/doc/CHANGES-7.3:1.1.2.76 --- src/doc/CHANGES-7.3:1.1.2.75 Tue Jan 21 19:21:14 2020 +++ src/doc/CHANGES-7.3 Wed Feb 12 20:21:12 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.75 2020/01/21 19:21:14 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.76 2020/02/12 20:21:12 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -792,3 +792,13 @@ sys/sys/shm.h 1.54 (patch) subsystems. [christos, ticket #1720] +sys/arch/mac68k/nubus/grf_nubus.c 1.78 + + Set sc_dev field of softc. + [tsutsui, ticket #1721] + +external/bsd/ppp/dist/pppd/eap.c 1.5 + + pppd: Fix bounds check in EAP code + [christos, ticket #1722] +
CVS commit: [netbsd-7] src/external/bsd/ppp/dist/pppd
Module Name:src Committed By: martin Date: Wed Feb 12 20:19:10 UTC 2020 Modified Files: src/external/bsd/ppp/dist/pppd [netbsd-7]: eap.c Log Message: Pull up following revision(s) (requested by christos in ticket #1722): external/bsd/ppp/dist/pppd/eap.c: revision 1.5 pppd: Fix bounds check in EAP code Given that we have just checked vallen < len, it can never be the case that vallen >= len + sizeof(rhostname). This fixes the check so we actually avoid overflowing the rhostname array. Reported-by: Ilja Van Sprundel Signed-off-by: Paul Mackerras From: https://github.com/paulusmack/ppp/commit/8d7970b8f3db727fe798b65f3377fe6787575426 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.6.1 src/external/bsd/ppp/dist/pppd/eap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ppp/dist/pppd/eap.c diff -u src/external/bsd/ppp/dist/pppd/eap.c:1.2 src/external/bsd/ppp/dist/pppd/eap.c:1.2.6.1 --- src/external/bsd/ppp/dist/pppd/eap.c:1.2 Thu Nov 28 22:33:42 2013 +++ src/external/bsd/ppp/dist/pppd/eap.c Wed Feb 12 20:19:10 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: eap.c,v 1.2 2013/11/28 22:33:42 christos Exp $ */ +/* $NetBSD: eap.c,v 1.2.6.1 2020/02/12 20:19:10 martin Exp $ */ /* * eap.c - Extensible Authentication Protocol for PPP (RFC 2284) * @@ -49,7 +49,7 @@ #define RCSID "Id: eap.c,v 1.4 2004/11/09 22:39:25 paulus Exp " static const char rcsid[] = RCSID; #else -__RCSID("$NetBSD: eap.c,v 1.2 2013/11/28 22:33:42 christos Exp $"); +__RCSID("$NetBSD: eap.c,v 1.2.6.1 2020/02/12 20:19:10 martin Exp $"); #endif /* @@ -1433,7 +1433,7 @@ int len; } /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { + if (len - vallen >= sizeof (rhostname)) { dbglog("EAP: trimming really long peer name down"); BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1); rhostname[sizeof (rhostname) - 1] = '\0'; @@ -1859,7 +1859,7 @@ int len; } /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { + if (len - vallen >= sizeof (rhostname)) { dbglog("EAP: trimming really long peer name down"); BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1); rhostname[sizeof (rhostname) - 1] = '\0';
CVS commit: [netbsd-7] src/sys/arch/mac68k/nubus
Module Name:src Committed By: martin Date: Wed Feb 12 20:17:14 UTC 2020 Modified Files: src/sys/arch/mac68k/nubus [netbsd-7]: grf_nubus.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1721): sys/arch/mac68k/nubus/grf_nubus.c: revision 1.78 Set sc_dev field of softc. Should pullup to 7. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.77.4.1 src/sys/arch/mac68k/nubus/grf_nubus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mac68k/nubus/grf_nubus.c diff -u src/sys/arch/mac68k/nubus/grf_nubus.c:1.77 src/sys/arch/mac68k/nubus/grf_nubus.c:1.77.4.1 --- src/sys/arch/mac68k/nubus/grf_nubus.c:1.77 Fri Oct 25 21:42:30 2013 +++ src/sys/arch/mac68k/nubus/grf_nubus.c Wed Feb 12 20:17:14 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $ */ +/* $NetBSD: grf_nubus.c,v 1.77.4.1 2020/02/12 20:17:14 martin Exp $ */ /* * Copyright (c) 1995 Allen Briggs. All rights reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.77 2013/10/25 21:42:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_nubus.c,v 1.77.4.1 2020/02/12 20:17:14 martin Exp $"); #include @@ -143,6 +143,7 @@ grfmv_attach(device_t parent, device_t s memcpy(>sc_slot, na->fmt, sizeof(nubus_slot)); + sc->sc_dev = self; sc->sc_tag = na->na_tag; sc->card_id = na->drhw; sc->sc_basepa = (bus_addr_t)NUBUS_SLOT2PA(na->slot);
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Jan 21 19:21:14 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1720 To generate a diff of this commit: cvs rdiff -u -r1.1.2.74 -r1.1.2.75 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.74 src/doc/CHANGES-7.3:1.1.2.75 --- src/doc/CHANGES-7.3:1.1.2.74 Thu Jan 2 09:56:51 2020 +++ src/doc/CHANGES-7.3 Tue Jan 21 19:21:14 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.74 2020/01/02 09:56:51 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.75 2020/01/21 19:21:14 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -759,3 +759,36 @@ sys/conf/copyright1.18 Welcome to 2020. [mlelstv, ticket #1719] +sys/compat/common/kern_sig_43.c1.36 +sys/compat/linux/arch/amd64/linux_machdep.c 1.59 +sys/compat/linux/common/linux_fcntl.h 1.18 +sys/compat/linux/common/linux_file64.c 1.62 +sys/compat/linux/common/linux_ipc.c 1.57 +sys/compat/linux/common/linux_misc.c 1.243 +sys/compat/linux/common/linux_signal.c 1.81 +sys/compat/linux/common/linux_socket.c 1.149 (patch) +sys/compat/linux/common/linux_socket.h 1.24 +sys/compat/linux/common/linux_statfs.h 1.7 +sys/compat/linux/common/linux_termios.c 1.38 +sys/compat/linux/common/linux_termios.h 1.22 +sys/compat/linux32/common/linux32_dirent.c 1.20 +sys/compat/linux32/common/linux32_ioctl.c 1.14 +sys/compat/linux32/common/linux32_misc.c 1.27 +sys/compat/linux32/common/linux32_signal.c 1.20 +sys/compat/linux32/common/linux32_sysinfo.c 1.8 +sys/compat/linux32/common/linux32_termios.c 1.15 +sys/compat/linux32/common/linux32_utsname.c 1.10 +sys/compat/netbsd32/netbsd32_compat_20.c 1.39 +sys/compat/netbsd32/netbsd32_compat_43.c 1.59 +sys/compat/netbsd32/netbsd32_compat_50.c 1.44 +sys/compat/ossaudio/ossaudio.c1.75 +sys/kern/sysv_shm.c 1.138 +sys/miscfs/procfs/procfs_linux.c 1.75 (patch) +sys/sys/shm.h 1.54 (patch) + + Fix various info leaks, out of bound access, usage of uninitialized + values and direct access to userland variables from kernel space + and memory leaks in system calls implemented for the compatibility + subsystems. + [christos, ticket #1720] +
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: martin Date: Tue Jan 21 19:19:17 UTC 2020 Modified Files: src/sys/compat/common [netbsd-7]: kern_sig_43.c src/sys/compat/linux/arch/amd64 [netbsd-7]: linux_machdep.c src/sys/compat/linux/common [netbsd-7]: linux_fcntl.h linux_file64.c linux_ipc.c linux_misc.c linux_signal.c linux_socket.c linux_socket.h linux_statfs.h linux_termios.c linux_termios.h src/sys/compat/linux32/common [netbsd-7]: linux32_dirent.c linux32_ioctl.c linux32_misc.c linux32_signal.c linux32_sysinfo.c linux32_termios.c linux32_utsname.c src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_20.c netbsd32_compat_43.c netbsd32_compat_50.c src/sys/compat/ossaudio [netbsd-7]: ossaudio.c src/sys/kern [netbsd-7]: sysv_shm.c src/sys/miscfs/procfs [netbsd-7]: procfs_linux.c src/sys/sys [netbsd-7]: shm.h Log Message: Pull up the following, requested by christos in ticket #1720: sys/compat/common/kern_sig_43.c 1.36 sys/compat/linux/arch/amd64/linux_machdep.c 1.59 sys/compat/linux/common/linux_fcntl.h 1.18 sys/compat/linux/common/linux_file64.c 1.62 sys/compat/linux/common/linux_ipc.c 1.57 sys/compat/linux/common/linux_misc.c1.243 sys/compat/linux/common/linux_signal.c 1.81 sys/compat/linux/common/linux_socket.c 1.149 (patch) sys/compat/linux/common/linux_socket.h 1.24 sys/compat/linux/common/linux_statfs.h 1.7 sys/compat/linux/common/linux_termios.c 1.38 sys/compat/linux/common/linux_termios.h 1.22 sys/compat/linux32/common/linux32_dirent.c 1.20 sys/compat/linux32/common/linux32_ioctl.c 1.14 sys/compat/linux32/common/linux32_misc.c1.27 sys/compat/linux32/common/linux32_signal.c 1.20 sys/compat/linux32/common/linux32_sysinfo.c 1.8 sys/compat/linux32/common/linux32_termios.c 1.15 sys/compat/linux32/common/linux32_utsname.c 1.10 sys/compat/netbsd32/netbsd32_compat_20.c1.39 sys/compat/netbsd32/netbsd32_compat_43.c1.59 sys/compat/netbsd32/netbsd32_compat_50.c1.44 sys/compat/ossaudio/ossaudio.c 1.75 sys/kern/sysv_shm.c 1.138 sys/miscfs/procfs/procfs_linux.c1.75 (patch) sys/sys/shm.h 1.54 (patch) Fix various info leaks, out of bound access, usage of uninitialized values and direct access to userland variables from kernel space and memory leaks in system calls implemented for the compatibility subsystems. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.34.32.1 src/sys/compat/common/kern_sig_43.c cvs rdiff -u -r1.48.4.1 -r1.48.4.2 \ src/sys/compat/linux/arch/amd64/linux_machdep.c cvs rdiff -u -r1.16 -r1.16.2.1 src/sys/compat/linux/common/linux_fcntl.h cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/compat/linux/common/linux_file64.c cvs rdiff -u -r1.55.30.1 -r1.55.30.2 src/sys/compat/linux/common/linux_ipc.c cvs rdiff -u -r1.229.2.2 -r1.229.2.3 src/sys/compat/linux/common/linux_misc.c cvs rdiff -u -r1.75.26.1 -r1.75.26.2 \ src/sys/compat/linux/common/linux_signal.c cvs rdiff -u -r1.119.2.2 -r1.119.2.3 \ src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.22 -r1.22.4.1 src/sys/compat/linux/common/linux_socket.h cvs rdiff -u -r1.6 -r1.6.12.1 src/sys/compat/linux/common/linux_statfs.h cvs rdiff -u -r1.37 -r1.37.4.1 src/sys/compat/linux/common/linux_termios.c cvs rdiff -u -r1.21 -r1.21.28.1 src/sys/compat/linux/common/linux_termios.h cvs rdiff -u -r1.13.28.1 -r1.13.28.2 \ src/sys/compat/linux32/common/linux32_dirent.c cvs rdiff -u -r1.13 -r1.13.38.1 src/sys/compat/linux32/common/linux32_ioctl.c cvs rdiff -u -r1.23.4.1 -r1.23.4.2 \ src/sys/compat/linux32/common/linux32_misc.c cvs rdiff -u -r1.17 -r1.17.4.1 src/sys/compat/linux32/common/linux32_signal.c cvs rdiff -u -r1.7 -r1.7.42.1 src/sys/compat/linux32/common/linux32_sysinfo.c cvs rdiff -u -r1.14 -r1.14.42.1 \ src/sys/compat/linux32/common/linux32_termios.c cvs rdiff -u -r1.9 -r1.9.42.1 src/sys/compat/linux32/common/linux32_utsname.c cvs rdiff -u -r1.33 -r1.33.4.1 src/sys/compat/netbsd32/netbsd32_compat_20.c cvs rdiff -u -r1.53 -r1.53.34.1 src/sys/compat/netbsd32/netbsd32_compat_43.c cvs rdiff -u -r1.24.2.1 -r1.24.2.2 \ src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r1.68 -r1.68.4.1 src/sys/compat/ossaudio/ossaudio.c cvs rdiff -u -r1.125.2.1 -r1.125.2.2 src/sys/kern/sysv_shm.c cvs rdiff -u -r1.70
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Jan 2 09:56:51 UTC 2020 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1719 To generate a diff of this commit: cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.73 src/doc/CHANGES-7.3:1.1.2.74 --- src/doc/CHANGES-7.3:1.1.2.73 Tue Dec 17 16:33:57 2019 +++ src/doc/CHANGES-7.3 Thu Jan 2 09:56:51 2020 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.73 2019/12/17 16:33:57 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.74 2020/01/02 09:56:51 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -754,3 +754,8 @@ sys/dev/ic/ath.c1.129 Protect network ioctls from non-authorized users. [christos, ticket #1718] +sys/conf/copyright1.18 + + Welcome to 2020. + [mlelstv, ticket #1719] +
CVS commit: [netbsd-7] src/sys/conf
Module Name:src Committed By: martin Date: Thu Jan 2 09:56:13 UTC 2020 Modified Files: src/sys/conf [netbsd-7]: copyright Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1719): sys/conf/copyright: revision 1.18 Welcome to 2020. To generate a diff of this commit: cvs rdiff -u -r1.12.4.4 -r1.12.4.5 src/sys/conf/copyright Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/copyright diff -u src/sys/conf/copyright:1.12.4.4 src/sys/conf/copyright:1.12.4.5 --- src/sys/conf/copyright:1.12.4.4 Wed Jan 2 15:31:46 2019 +++ src/sys/conf/copyright Thu Jan 2 09:56:12 2020 @@ -1,5 +1,5 @@ Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, -2018, 2019 The NetBSD Foundation, Inc. All rights reserved. +2018, 2019, 2020 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Dec 17 16:33:57 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1718 To generate a diff of this commit: cvs rdiff -u -r1.1.2.72 -r1.1.2.73 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.72 src/doc/CHANGES-7.3:1.1.2.73 --- src/doc/CHANGES-7.3:1.1.2.72 Sun Dec 8 10:26:08 2019 +++ src/doc/CHANGES-7.3 Tue Dec 17 16:33:57 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.72 2019/12/08 10:26:08 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.73 2019/12/17 16:33:57 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -749,3 +749,8 @@ sys/dev/cons.c 1.76,1.77 Fix reference count leak in cons(4). [riastradh, ticket #1717] +sys/dev/ic/ath.c1.129 + + Protect network ioctls from non-authorized users. + [christos, ticket #1718] +
CVS commit: [netbsd-7] src/sys/dev/ic
Module Name:src Committed By: martin Date: Tue Dec 17 16:32:51 UTC 2019 Modified Files: src/sys/dev/ic [netbsd-7]: ath.c Log Message: Pull up following revision(s) (requested by christos in ticket #1718): sys/dev/ic/ath.c: revision 1.129 Protect network ioctls from non-authorized users. (Ilja Van Sprundel) To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.116.4.1 src/sys/dev/ic/ath.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/ath.c diff -u src/sys/dev/ic/ath.c:1.116 src/sys/dev/ic/ath.c:1.116.4.1 --- src/sys/dev/ic/ath.c:1.116 Thu Sep 12 12:17:53 2013 +++ src/sys/dev/ic/ath.c Tue Dec 17 16:32:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ath.c,v 1.116 2013/09/12 12:17:53 martin Exp $ */ +/* $NetBSD: ath.c,v 1.116.4.1 2019/12/17 16:32:51 martin Exp $ */ /*- * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.116 2013/09/12 12:17:53 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.116.4.1 2019/12/17 16:32:51 martin Exp $"); #endif /* @@ -69,6 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.11 #include #include #include +#include #include #include @@ -5362,6 +5363,12 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, return copyout(>sc_stats, ifr->ifr_data, sizeof (sc->sc_stats)); case SIOCGATHDIAG: + error = kauth_authorize_network(curlwp->l_cred, + KAUTH_NETWORK_INTERFACE, + KAUTH_REQ_NETWORK_INTERFACE_SETPRIV, ifp, KAUTH_ARG(cmd), + NULL); + if (error) + break; error = ath_ioctl_diag(sc, (struct ath_diag *) ifr); break; default:
CVS commit: [netbsd-7] src/sys/dev
Module Name:src Committed By: martin Date: Sun Dec 8 10:25:38 UTC 2019 Modified Files: src/sys/dev [netbsd-7]: cons.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1717): sys/dev/cons.c: revision 1.76 sys/dev/cons.c: revision 1.77 Fix reference count leak in cons(4). Don't forget to vrele after you're done, folks! Restore historical $Hdr$ tag after git cvsexportcommit nixed it. To generate a diff of this commit: cvs rdiff -u -r1.72.2.1 -r1.72.2.2 src/sys/dev/cons.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/cons.c diff -u src/sys/dev/cons.c:1.72.2.1 src/sys/dev/cons.c:1.72.2.2 --- src/sys/dev/cons.c:1.72.2.1 Mon Mar 9 08:00:46 2015 +++ src/sys/dev/cons.c Sun Dec 8 10:25:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cons.c,v 1.72.2.1 2015/03/09 08:00:46 snj Exp $ */ +/* $NetBSD: cons.c,v 1.72.2.2 2019/12/08 10:25:38 martin Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.72.2.1 2015/03/09 08:00:46 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cons.c,v 1.72.2.2 2019/12/08 10:25:38 martin Exp $"); #include #include @@ -150,6 +150,7 @@ cnclose(dev_t dev, int flag, int mode, s if (error == 0) { error = VOP_CLOSE(vp, flag, kauth_cred_get()); VOP_UNLOCK(vp); + vrele(vp); } return error; }
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sun Dec 8 10:26:08 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1717 To generate a diff of this commit: cvs rdiff -u -r1.1.2.71 -r1.1.2.72 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.71 src/doc/CHANGES-7.3:1.1.2.72 --- src/doc/CHANGES-7.3:1.1.2.71 Thu Dec 5 16:30:45 2019 +++ src/doc/CHANGES-7.3 Sun Dec 8 10:26:08 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.71 2019/12/05 16:30:45 bouyer Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.72 2019/12/08 10:26:08 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -744,3 +744,8 @@ sys/external/bsd/dwc2/dwc2.c 1.60 - 1. PR/54696: Kernel panic in bus_dma.c on Raspberry Pi 3B/3B+ [skrll, ticket #1716] +sys/dev/cons.c 1.76,1.77 + + Fix reference count leak in cons(4). + [riastradh, ticket #1717] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: bouyer Date: Thu Dec 5 16:30:45 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: ticket 1716 To generate a diff of this commit: cvs rdiff -u -r1.1.2.70 -r1.1.2.71 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.70 src/doc/CHANGES-7.3:1.1.2.71 --- src/doc/CHANGES-7.3:1.1.2.70 Thu Dec 5 16:25:17 2019 +++ src/doc/CHANGES-7.3 Thu Dec 5 16:30:45 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.70 2019/12/05 16:25:17 bouyer Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.71 2019/12/05 16:30:45 bouyer Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -737,3 +737,10 @@ share/man/man4/rnd.41.25 - 1.28 Update NIST SP800-90A reference. [riastradh, ticket #1715] +sys/external/bsd/dwc2/dwc2.c 1.60 - 1.66 + + Make dwc2debug sysctl'able + Calulate the right lenght for isoc transfer and the usb_syncmem + PR/54696: Kernel panic in bus_dma.c on Raspberry Pi 3B/3B+ + [skrll, ticket #1716] +
CVS commit: [netbsd-7] src/sys/external/bsd/dwc2
Module Name:src Committed By: bouyer Date: Thu Dec 5 16:30:17 UTC 2019 Modified Files: src/sys/external/bsd/dwc2 [netbsd-7]: dwc2.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1716): sys/external/bsd/dwc2/dwc2.c: revision 1.60 sys/external/bsd/dwc2/dwc2.c: revision 1.61 sys/external/bsd/dwc2/dwc2.c: revision 1.62 sys/external/bsd/dwc2/dwc2.c: revision 1.63 sys/external/bsd/dwc2/dwc2.c: revision 1.64 sys/external/bsd/dwc2/dwc2.c: revision 1.65 sys/external/bsd/dwc2/dwc2.c: revision 1.66 KNF Make dwc2debug sysctl'able Need for previous Use size_t for loop count variable Calulate the right lenght for isoc transfer and the usb_syncmem PR/54696: Kernel panic in bus_dma.c on Raspberry Pi 3B/3B+ build fix Consistency. To generate a diff of this commit: cvs rdiff -u -r1.31.2.4 -r1.31.2.5 src/sys/external/bsd/dwc2/dwc2.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/dwc2/dwc2.c diff -u src/sys/external/bsd/dwc2/dwc2.c:1.31.2.4 src/sys/external/bsd/dwc2/dwc2.c:1.31.2.5 --- src/sys/external/bsd/dwc2/dwc2.c:1.31.2.4 Sat Aug 25 14:57:35 2018 +++ src/sys/external/bsd/dwc2/dwc2.c Thu Dec 5 16:30:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc2.c,v 1.31.2.4 2018/08/25 14:57:35 martin Exp $ */ +/* $NetBSD: dwc2.c,v 1.31.2.5 2019/12/05 16:30:17 bouyer Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,19 +30,21 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.31.2.4 2018/08/25 14:57:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.31.2.5 2019/12/05 16:30:17 bouyer Exp $"); #include "opt_usb.h" #include -#include -#include -#include + +#include #include -#include +#include +#include #include #include -#include +#include +#include +#include #include @@ -74,6 +76,33 @@ __KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.3 } while (0) #define DPRINTF(...) DPRINTFN(1, __VA_ARGS__) int dwc2debug = 0; + +SYSCTL_SETUP(sysctl_hw_dwc2_setup, "sysctl hw.dwc2 setup") +{ + int err; + const struct sysctlnode *rnode; + const struct sysctlnode *cnode; + + err = sysctl_createv(clog, 0, NULL, , + CTLFLAG_PERMANENT, CTLTYPE_NODE, "dwc2", + SYSCTL_DESCR("dwc2 global controls"), + NULL, 0, NULL, 0, CTL_HW, CTL_CREATE, CTL_EOL); + + if (err) + goto fail; + + /* control debugging printfs */ + err = sysctl_createv(clog, 0, , , + CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, + "debug", SYSCTL_DESCR("Enable debugging output"), + NULL, 0, , sizeof(dwc2debug), CTL_CREATE, CTL_EOL); + if (err) + goto fail; + + return; +fail: + aprint_error("%s: sysctl_createv failed (err = %d)\n", __func__, err); +} #else #define DPRINTF(...) do { } while (0) #define DPRINTFN(...) do { } while (0) @@ -944,7 +973,6 @@ dwc2_device_start(struct usbd_xfer *xfer uint32_t off = 0; int retval, err; int alloc_bandwidth = 0; - int i; DPRINTFN(1, "xfer=%p pipe=%p\n", xfer, xfer->ux_pipe); @@ -984,6 +1012,14 @@ dwc2_device_start(struct usbd_xfer *xfer DPRINTFN(3, "req = %p dma = %" PRIxBUSADDR " len %d dir %s\n", KERNADDR(>req_dma, 0), DMAADDR(>req_dma, 0), len, dir == UE_DIR_IN ? "in" : "out"); + } else if (xfertype == UE_ISOCHRONOUS) { + DPRINTFN(3, "xfer=%p nframes=%d flags=%d addr=%d endpt=%d," + " mps=%d dir %s\n", xfer, xfer->ux_nframes, xfer->ux_flags, addr, + epnum, mps, dir == UT_READ ? "in" :"out"); + + len = 0; + for (size_t i = 0; i < xfer->ux_nframes; i++) + len += xfer->ux_frlengths[i]; } else { DPRINTFN(3, "xfer=%p len=%d flags=%d addr=%d endpt=%d," " mps=%d dir %s\n", xfer, xfer->ux_length, xfer->ux_flags, addr, @@ -1077,8 +1113,9 @@ dwc2_device_start(struct usbd_xfer *xfer KASSERTMSG(xfer->ux_nframes == 0 || xfertype == UE_ISOCHRONOUS, "nframes %d xfertype %d\n", xfer->ux_nframes, xfertype); - for (off = i = 0; i < xfer->ux_nframes; ++i) { - DPRINTFN(3, "xfer=%p frame=%d offset=%d length=%d\n", xfer, i, + off = 0; + for (size_t i = 0; i < xfer->ux_nframes; ++i) { + DPRINTFN(3, "xfer=%p frame=%zd offset=%d length=%d\n", xfer, i, off, xfer->ux_frlengths[i]); dwc2_hcd_urb_set_iso_desc_params(dwc2_urb, i, off, @@ -1469,22 +1506,21 @@ void dwc2_host_complete(struct dwc2_hsot DPRINTFN(3, "xfer=%p actlen=%d\n", xfer, xfer->ux_actlen); if (xfertype == UE_ISOCHRONOUS) { - int i; - xfer->ux_actlen = 0; - for (i = 0; i < xfer->ux_nframes; ++i) { + for (size_t i = 0; i < xfer->ux_nframes; ++i) { xfer->ux_frlengths[i] = dwc2_hcd_urb_get_iso_desc_actual_length( urb, i); + DPRINTFN(1, "xfer=%p frame=%zu length=%d\n", xfer, i, + xfer->ux_frlengths[i]); xfer->ux_actlen += xfer->ux_frlengths[i]; } + DPRINTFN(1, "xfer=%p actlen=%d (isoc)\n", xfer, xfer->ux_actlen); } if (xfertype == UE_ISOCHRONOUS && dbg_perio()) { - int i; - - for (i =
CVS commit: [netbsd-7] src/share/man/man4
Module Name:src Committed By: bouyer Date: Thu Dec 5 16:29:23 UTC 2019 Modified Files: src/share/man/man4 [netbsd-7]: rnd.4 Log Message: Pull up following revision(s) (requested by riastradh in ticket #1715): share/man/man4/rnd.4: revision 1.26 share/man/man4/rnd.4: revision 1.27 share/man/man4/rnd.4: revision 1.28 share/man/man4/rnd.4: revision 1.25 Update man page to reflect switch from CTR_DRBG to Hash_DRBG. Replace slightly wrong rant by shorter and slightly less long rant. (If X and Y in Z/2Z are independent, then so are X and X+Y. What was I thinking.) Update NIST SP800-90A reference. New sentence, new line. Use \(em. To generate a diff of this commit: cvs rdiff -u -r1.20.10.1 -r1.20.10.2 src/share/man/man4/rnd.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/rnd.4 diff -u src/share/man/man4/rnd.4:1.20.10.1 src/share/man/man4/rnd.4:1.20.10.2 --- src/share/man/man4/rnd.4:1.20.10.1 Wed Mar 18 07:54:26 2015 +++ src/share/man/man4/rnd.4 Thu Dec 5 16:29:23 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: rnd.4,v 1.20.10.1 2015/03/18 07:54:26 snj Exp $ +.\" $NetBSD: rnd.4,v 1.20.10.2 2019/12/05 16:29:23 bouyer Exp $ .\" .\" Copyright (c) 2014 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 16, 2014 +.Dd September 3, 2019 .Dt RND 4 .Os .Sh NAME @@ -187,8 +187,8 @@ quantum computers. Systems with nonvolatile storage should store a secret from .Pa /dev/urandom on disk during installation or shutdown, and feed it back during boot, -so that the work the operating system has done to gather entropy -- -including the work its operator may have done to flip a coin! -- can be +so that the work the operating system has done to gather entropy \(em +including the work its operator may have done to flip a coin! \(em can be saved from one boot to the next, and so that newly installed systems are not vulnerable to generating cryptographic keys predictably. .Pp @@ -205,7 +205,7 @@ in see .Xr rc.conf 5 . .Sh LIMITATIONS -Some people worry about recovery from state compromise -- that is, +Some people worry about recovery from state compromise \(em that is, ensuring that even if an attacker sees the entire state of the operating system, then the attacker will be unable to predict any new future outputs as long as the operating system gathers fresh entropy @@ -404,9 +404,9 @@ When a user process opens or .Pa /dev/urandom and first reads from it, the kernel draws from the entropy pool to seed -a cryptographic pseudorandom number generator, the NIST CTR_DRBG -(counter-mode deterministic random bit generator) with AES-128 as the -block cipher, and uses that to generate data. +a cryptographic pseudorandom number generator, the NIST Hash_DRBG +(hash-based deterministic random bit generator) with SHA-256 as the +hash function, and uses that to generate data. .Pp To draw a seed from the entropy pool, the kernel .Bl -bullet -offset abcd -compact @@ -489,10 +489,10 @@ Never blocks. .%A Elaine Barker .%A John Kelsey .%T Recommendation for Random Number Generation Using Deterministic Random Bit Generators -.%D January 2012 +.%D June 2015 .%I National Institute of Standards and Technology -.%O NIST Special Publication 800-90A -.%U http://csrc.nist.gov/publications/nistpubs/800-90A/SP800-90A.pdf +.%O NIST Special Publication 800-90A, Revision 1 +.%U https://csrc.nist.gov/publications/detail/sp/800-90a/rev-1/final .Re .Rs .%A Daniel J. Bernstein @@ -551,59 +551,33 @@ Unfortunately, no amount of software eng .Sh ENTROPY ACCOUNTING The entropy accounting described here is not grounded in any cryptography theory. -It is done because it was always done, and because it gives people a -warm fuzzy feeling about information theory. +.Sq Entropy estimation +doesn't mean much: the kernel hypothesizes an extremely simple-minded +parametric model for all entropy sources which bears little relation to +any physical processes, implicitly fits parameters from data, and +accounts for the entropy of the fitted model. .Pp -The folklore is that every -.Fa n Ns -bit -output of -.Fa /dev/random -is not merely indistinguishable from uniform random to a -computationally bounded attacker, but information-theoretically is -independent and has -.Fa n -bits of entropy even to a computationally -.Em unbounded -attacker -- that is, an attacker who can recover AES keys, compute -SHA-1 preimages, etc. -This property is not provided, nor was it ever provided in any -implementation of -.Fa /dev/random -known to the author. -.Pp -This property would require that, after each read, the system discard -all measurements from hardware in the entropy pool and begin anew. -All work done to make the system unpredictable would be thrown
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: bouyer Date: Thu Dec 5 16:25:17 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: ticket 1715 To generate a diff of this commit: cvs rdiff -u -r1.1.2.69 -r1.1.2.70 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.69 src/doc/CHANGES-7.3:1.1.2.70 --- src/doc/CHANGES-7.3:1.1.2.69 Mon Nov 25 15:47:16 2019 +++ src/doc/CHANGES-7.3 Thu Dec 5 16:25:17 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.69 2019/11/25 15:47:16 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.70 2019/12/05 16:25:17 bouyer Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -731,3 +731,9 @@ sys/kern/subr_cprng.c1.33 Use cprng_strong, not cprng_fast, for sysctl kern.arnd. [riastradh, ticket #1714] +share/man/man4/rnd.41.25 - 1.28 + + Update man page to reflect switch from CTR_DRBG to Hash_DRBG. + Update NIST SP800-90A reference. + [riastradh, ticket #1715] +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue May 7 18:54:28 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1696 To generate a diff of this commit: cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.51 src/doc/CHANGES-7.3:1.1.2.52 --- src/doc/CHANGES-7.3:1.1.2.51 Sun May 5 09:04:48 2019 +++ src/doc/CHANGES-7.3 Tue May 7 18:54:28 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.51 2019/05/05 09:04:48 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.52 2019/05/07 18:54:28 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -567,3 +567,9 @@ external/bsd/dhcpcd/dist/src/dhcp6.c (a DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE. [roy, ticket #1695] +sys/netsmb/smb_conn.c1.30 + + Prevent a NULL pointer dereference when the local endpoint is not + defined. + [christos, ticket #1696] +
CVS commit: [netbsd-7] src/sys/netsmb
Module Name:src Committed By: martin Date: Tue May 7 18:53:51 UTC 2019 Modified Files: src/sys/netsmb [netbsd-7]: smb_conn.c Log Message: Pull up following revision(s) (requested by christos in ticket #1696): sys/netsmb/smb_conn.c: revision 1.30 Prevent a NULL pointer dereference when the local endpoint is not defined. >From Andy Nguyen, many thanks. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.29.14.1 src/sys/netsmb/smb_conn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netsmb/smb_conn.c diff -u src/sys/netsmb/smb_conn.c:1.29 src/sys/netsmb/smb_conn.c:1.29.14.1 --- src/sys/netsmb/smb_conn.c:1.29 Sun Apr 29 20:27:31 2012 +++ src/sys/netsmb/smb_conn.c Tue May 7 18:53:51 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $ */ +/* $NetBSD: smb_conn.c,v 1.29.14.1 2019/05/07 18:53:51 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29 2012/04/29 20:27:31 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_conn.c,v 1.29.14.1 2019/05/07 18:53:51 martin Exp $"); /* * Connection engine. @@ -553,7 +553,8 @@ smb_vc_create(struct smb_vcspec *vcspec, if ((vcp->vc_paddr = dup_sockaddr(vcspec->sap, 1)) == NULL) goto fail; - if ((vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL) + if (vcspec->lap && + (vcp->vc_laddr = dup_sockaddr(vcspec->lap, 1)) == NULL) goto fail; if ((vcp->vc_pass = smb_strdup(vcspec->pass)) == NULL)
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sun May 5 09:04:48 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1693 and #1695 To generate a diff of this commit: cvs rdiff -u -r1.1.2.50 -r1.1.2.51 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.50 src/doc/CHANGES-7.3:1.1.2.51 --- src/doc/CHANGES-7.3:1.1.2.50 Wed May 1 09:50:53 2019 +++ src/doc/CHANGES-7.3 Sun May 5 09:04:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.50 2019/05/01 09:50:53 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.51 2019/05/05 09:04:48 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -556,4 +556,14 @@ sys/kern/sys_pipe.c1.147,1.148 Handle half-closed pipes in FIONWRITE and FIONSPACE. [mlelstv, ticket #1692] +sys/arch/amd64/amd64/copy.S 1.33 +sys/arch/i386/i386/copy.S 1.31 + + Don't forget to clear the direction flag if kcopy fails. + [maxv, ticket #1693] + +external/bsd/dhcpcd/dist/src/dhcp6.c (apply patch) + + DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE. + [roy, ticket #1695]
CVS commit: [netbsd-7] src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: martin Date: Sun May 5 09:02:45 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist/src [netbsd-7]: dhcp6.c Log Message: Apply patch, requested by roy in ticket #1695: external/bsd/dhcpcd/dist/src/dhcp6.c DHCPv6: Fix a potential read overflow with D6_OPTION_PD_EXCLUDE To generate a diff of this commit: cvs rdiff -u -r1.1.1.12.4.4 -r1.1.1.12.4.5 \ src/external/bsd/dhcpcd/dist/src/dhcp6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.4 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.5 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.4 Fri Apr 26 19:47:23 2019 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Sun May 5 09:02:45 2019 @@ -2152,40 +2152,38 @@ dhcp6_findpd(struct interface *ifp, cons state->expire = a->prefix_vltime; i++; - o = dhcp6_findoption(o, ol, D6_OPTION_PD_EXCLUDE, ); a->prefix_exclude_len = 0; memset(>prefix_exclude, 0, sizeof(a->prefix_exclude)); -#if 0 - if (ex == NULL) { - struct dhcp6_option *w; - uint8_t *wp; - - w = calloc(1, 128); - w->len = htons(2); - wp = D6_OPTION_DATA(w); - *wp++ = 64; - *wp++ = 0x78; - ex = w; - } -#endif + o = dhcp6_findoption(o, ol, D6_OPTION_PD_EXCLUDE, ); if (o == NULL) continue; - if (ol < 2) { - logerrx("%s: truncated PD Exclude", ifp->name); + + /* RFC 6603 4.2 says option length MUST be between 2 and 17. + * This allows 1 octet for prefix length and 16 for the + * subnet ID. */ + if (ol < 2 || ol > 17) { + logerrx("%s: invalid PD Exclude option", ifp->name); continue; } - a->prefix_exclude_len = *o++; + + /* RFC 6603 4.2 says prefix length MUST be between the + * length of the IAPREFIX prefix length + 1 and 128. */ + if (*o < a->prefix_len + 1 || *o > 128) { + logerrx("%s: invalid PD Exclude length", ifp->name); + continue; + } + ol--; - if (((a->prefix_exclude_len - a->prefix_len - 1) / NBBY) + 1 - != ol) - { + /* Check option length matches prefix length. */ + if (((*o - a->prefix_len - 1) / NBBY) + 1 != ol) { logerrx("%s: PD Exclude length mismatch", ifp->name); - a->prefix_exclude_len = 0; continue; } - nb = a->prefix_len % NBBY; + a->prefix_exclude_len = *o++; + memcpy(>prefix_exclude, >prefix, sizeof(a->prefix_exclude)); + nb = a->prefix_len % NBBY; if (nb) ol--; pw = a->prefix_exclude.s6_addr +
CVS commit: [netbsd-7] src/sys/arch
Module Name:src Committed By: martin Date: Sun May 5 08:48:13 UTC 2019 Modified Files: src/sys/arch/amd64/amd64 [netbsd-7]: copy.S src/sys/arch/i386/i386 [netbsd-7]: copy.S Log Message: Pull up following revision(s) (requested by maxv in ticket #1693): sys/arch/amd64/amd64/copy.S: revision 1.33 sys/arch/i386/i386/copy.S: revision 1.31 Hum. Fix a potentially catastrophic bug: kcopy() sets DF=1 if the areas overlap, but doesn't clear it if the copy faults. If this happens, we return to the caller with DF=1, and each future memory copy will be backwards. I wonder if there really are places where kcopy() is called with overlapping areas. To generate a diff of this commit: cvs rdiff -u -r1.18.34.1 -r1.18.34.2 src/sys/arch/amd64/amd64/copy.S cvs rdiff -u -r1.23 -r1.23.4.1 src/sys/arch/i386/i386/copy.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/copy.S diff -u src/sys/arch/amd64/amd64/copy.S:1.18.34.1 src/sys/arch/amd64/amd64/copy.S:1.18.34.2 --- src/sys/arch/amd64/amd64/copy.S:1.18.34.1 Sat Dec 24 04:07:25 2016 +++ src/sys/arch/amd64/amd64/copy.S Sun May 5 08:48:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.18.34.1 2016/12/24 04:07:25 snj Exp $ */ +/* $NetBSD: copy.S,v 1.18.34.2 2019/05/05 08:48:13 martin Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -233,6 +233,7 @@ NENTRY(copy_efault) */ NENTRY(kcopy_fault) + cld ret NENTRY(copy_fault) Index: src/sys/arch/i386/i386/copy.S diff -u src/sys/arch/i386/i386/copy.S:1.23 src/sys/arch/i386/i386/copy.S:1.23.4.1 --- src/sys/arch/i386/i386/copy.S:1.23 Fri Jan 10 16:47:07 2014 +++ src/sys/arch/i386/i386/copy.S Sun May 5 08:48:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $ */ +/* $NetBSD: copy.S,v 1.23.4.1 2019/05/05 08:48:13 martin Exp $ */ /* NetBSD: locore.S,v 1.34 2005/04/01 11:59:31 yamt Exp $ */ /*- @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23 2014/01/10 16:47:07 pedro Exp $"); +__KERNEL_RCSID(0, "$NetBSD: copy.S,v 1.23.4.1 2019/05/05 08:48:13 martin Exp $"); #include "assym.h" @@ -308,6 +308,7 @@ NENTRY(copy_efault) */ /* LINTSTUB: Ignore */ NENTRY(kcopy_fault) + cld popl %edi popl %esi ret
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed May 1 09:50:53 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1691 and #1692 To generate a diff of this commit: cvs rdiff -u -r1.1.2.49 -r1.1.2.50 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.49 src/doc/CHANGES-7.3:1.1.2.50 --- src/doc/CHANGES-7.3:1.1.2.49 Fri Apr 26 19:48:00 2019 +++ src/doc/CHANGES-7.3 Wed May 1 09:50:53 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.49 2019/04/26 19:48:00 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.50 2019/05/01 09:50:53 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -543,3 +543,17 @@ external/bsd/dhcpcd/dist/compat/consttim Fix a potential 1 byte read overflow with DHO_OPTSOVERLOADED. Use consttime_memequal(3) to compare hashes. [roy, ticket #1690] + +sys/dev/veriexec.config1.1 (patch) + + Add a configuration file for enabling Veriexec in kernel config(5) + files. + [sevan, ticket #1691] + +sys/kern/sys_pipe.c1.147,1.148 + + Clean up pipe structure before recycling it. + Handle half-closed pipes in FIONWRITE and FIONSPACE. + [mlelstv, ticket #1692] + +
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Wed May 1 09:48:56 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: sys_pipe.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1692): sys/kern/sys_pipe.c: revision 1.147 sys/kern/sys_pipe.c: revision 1.148 Clean up pipe structure before recycling it. Handle half-closed pipes in FIONWRITE and FIONSPACE. To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.138.4.1 src/sys/kern/sys_pipe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_pipe.c diff -u src/sys/kern/sys_pipe.c:1.138 src/sys/kern/sys_pipe.c:1.138.4.1 --- src/sys/kern/sys_pipe.c:1.138 Tue Feb 25 18:30:11 2014 +++ src/sys/kern/sys_pipe.c Wed May 1 09:48:56 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_pipe.c,v 1.138 2014/02/25 18:30:11 pooka Exp $ */ +/* $NetBSD: sys_pipe.c,v 1.138.4.1 2019/05/01 09:48:56 martin Exp $ */ /*- * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.138 2014/02/25 18:30:11 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_pipe.c,v 1.138.4.1 2019/05/01 09:48:56 martin Exp $"); #include #include @@ -1107,10 +1107,12 @@ pipe_ioctl(file_t *fp, u_long cmd, void case FIONWRITE: /* Look at other side */ - pipe = pipe->pipe_peer; mutex_enter(lock); + pipe = pipe->pipe_peer; + if (pipe == NULL) + *(int *)data = 0; #ifndef PIPE_NODIRECT - if (pipe->pipe_state & PIPE_DIRECTW) + else if (pipe->pipe_state & PIPE_DIRECTW) *(int *)data = pipe->pipe_map.cnt; else #endif @@ -1120,8 +1122,11 @@ pipe_ioctl(file_t *fp, u_long cmd, void case FIONSPACE: /* Look at other side */ - pipe = pipe->pipe_peer; mutex_enter(lock); + pipe = pipe->pipe_peer; + if (pipe == NULL) + *(int *)data = 0; + else #ifndef PIPE_NODIRECT /* * If we're in direct-mode, we don't really have a @@ -1346,6 +1351,8 @@ pipeclose(struct pipe *pipe) free_resources: pipe->pipe_pgid = 0; pipe->pipe_state = PIPE_SIGNALR; + pipe->pipe_peer = NULL; + pipe->pipe_lock = NULL; pipe_free_kmem(pipe); if (pipe->pipe_kmem != 0) { pool_cache_put(pipe_rd_cache, pipe);
CVS commit: [netbsd-7] src/sys/dev
Module Name:src Committed By: martin Date: Wed May 1 09:47:05 UTC 2019 Added Files: src/sys/dev [netbsd-7]: veriexec.config Log Message: Pull up following revision(s), via patch as options differ on the branch (requested by sevan in ticket #1691): sys/dev/veriexec.config: revision 1.1 Add a configuration file for enabling Veriexec in kernel config(5) files. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.4.2 src/sys/dev/veriexec.config Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/dev/veriexec.config diff -u /dev/null src/sys/dev/veriexec.config:1.1.4.2 --- /dev/null Wed May 1 09:47:05 2019 +++ src/sys/dev/veriexec.config Wed May 1 09:47:05 2019 @@ -0,0 +1,21 @@ +# $NetBSD: veriexec.config,v 1.1.4.2 2019/05/01 09:47:05 martin Exp $ +# +# This file contains all Veriexec related configuration. +# It is suitable for inclusion in a kernel config(5) file. +# + +options FILEASSOC # fileassoc(9) - needed by Veriexec + # and PAX_SEGVGUARD + +# a pseudo device needed for veriexec +pseudo-device veriexec +# +# Note that removing fingerprint methods will have almost no impact on the +# kernel code size. +# +options VERIFIED_EXEC_FP_MD5 +options VERIFIED_EXEC_FP_RMD160 +options VERIFIED_EXEC_FP_SHA1 +options VERIFIED_EXEC_FP_SHA256 +options VERIFIED_EXEC_FP_SHA384 +options VERIFIED_EXEC_FP_SHA512
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Apr 26 19:48:00 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1690 To generate a diff of this commit: cvs rdiff -u -r1.1.2.48 -r1.1.2.49 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.48 src/doc/CHANGES-7.3:1.1.2.49 --- src/doc/CHANGES-7.3:1.1.2.48 Fri Apr 19 16:02:01 2019 +++ src/doc/CHANGES-7.3 Fri Apr 26 19:48:00 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.48 2019/04/19 16:02:01 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.49 2019/04/26 19:48:00 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -532,3 +532,14 @@ sys/net/if.c 1.449 (patch) of stack disclosure. [christos, ticket #1689] +external/bsd/dhcpcd/dist/configure (apply patch) +external/bsd/dhcpcd/dist/src/auth.c (apply patch) +external/bsd/dhcpcd/dist/src/dhcp.c (apply patch) +external/bsd/dhcpcd/dist/src/dhcp6.c (apply patch) +external/bsd/dhcpcd/dist/compat/consttime_memequal.h (apply patch) + + Security fixes for dhcpcd: + Fix a potential buffer overflow reading NA/TA addresses. + Fix a potential 1 byte read overflow with DHO_OPTSOVERLOADED. + Use consttime_memequal(3) to compare hashes. + [roy, ticket #1690]
CVS commit: [netbsd-7] src/external/bsd/dhcpcd/dist
Module Name:src Committed By: martin Date: Fri Apr 26 19:47:23 UTC 2019 Modified Files: src/external/bsd/dhcpcd/dist [netbsd-7]: configure src/external/bsd/dhcpcd/dist/src [netbsd-7]: auth.c dhcp.c dhcp6.c Added Files: src/external/bsd/dhcpcd/dist/compat [netbsd-7]: consttime_memequal.h Log Message: Apply patch, requested by roy in ticket #1690: external/bsd/dhcpcd/dist/configure external/bsd/dhcpcd/dist/src/auth.c external/bsd/dhcpcd/dist/src/dhcp.c external/bsd/dhcpcd/dist/src/dhcp6.c external/bsd/dhcpcd/dist/compat/consttime_memequal.h Security fixes for dhcpcd: Fix a potential buffer overflow reading NA/TA addresses. Fix a potential 1 byte read overflow with DHO_OPTSOVERLOADED. Use consttime_memequal(3) to compare hashes. To generate a diff of this commit: cvs rdiff -u -r1.1.1.8.2.2 -r1.1.1.8.2.3 \ src/external/bsd/dhcpcd/dist/configure cvs rdiff -u -r0 -r1.1.1.1.4.2 \ src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h cvs rdiff -u -r1.1.1.5.4.2 -r1.1.1.5.4.3 \ src/external/bsd/dhcpcd/dist/src/auth.c cvs rdiff -u -r1.11.4.3 -r1.11.4.4 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.1.1.12.4.3 -r1.1.1.12.4.4 \ src/external/bsd/dhcpcd/dist/src/dhcp6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/configure diff -u src/external/bsd/dhcpcd/dist/configure:1.1.1.8.2.2 src/external/bsd/dhcpcd/dist/configure:1.1.1.8.2.3 --- src/external/bsd/dhcpcd/dist/configure:1.1.1.8.2.2 Fri Jul 27 10:43:19 2018 +++ src/external/bsd/dhcpcd/dist/configure Fri Apr 26 19:47:23 2019 @@ -13,6 +13,7 @@ IPV4LL= INET6= ARC4RANDOM= CLOSEFROM= +CONSTTIME_MEMEQUAL= STRLCPY= UDEV= OS= @@ -845,6 +846,27 @@ if [ "$STRTOI" = no ]; then echo "#include \"compat/strtoi.h\"" >>$CONFIG_H fi +if [ -z "$CONSTTIME_MEMEQUAL" ]; then + printf "Testing for consttime_memequal ... " + cat <_consttime_memequal.c +#include +int main(void) { + return consttime_memequal("deadbeef", "deadbeef", 8); +} +EOF + if $XCC _consttime_memequal.c -o _consttime_memequal 2>&3; then + CONSTTIME_MEMEQUAL=yes + else + CONSTTIME_MEMEQUAL=no + fi + echo "$CONSTTIME_MEMEQUAL" + rm -f _consttime_memequal.c _consttime_memequal +fi +if [ "$CONSTTIME_MEMEQUAL" = no ]; then + echo "#include \"compat/consttime_memequal.h\"" \ + >>$CONFIG_H +fi + if [ -z "$DPRINTF" ]; then printf "Testing for dprintf ... " cat <_dprintf.c Index: src/external/bsd/dhcpcd/dist/src/auth.c diff -u src/external/bsd/dhcpcd/dist/src/auth.c:1.1.1.5.4.2 src/external/bsd/dhcpcd/dist/src/auth.c:1.1.1.5.4.3 --- src/external/bsd/dhcpcd/dist/src/auth.c:1.1.1.5.4.2 Fri Jul 27 10:43:20 2018 +++ src/external/bsd/dhcpcd/dist/src/auth.c Fri Apr 26 19:47:23 2019 @@ -354,7 +354,7 @@ gottoken: } free(mm); - if (memcmp(d, _code, dlen)) { + if (!consttime_memequal(d, _code, dlen)) { errno = EPERM; return NULL; } Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.11.4.3 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.11.4.4 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.11.4.3 Sat Aug 25 15:03:00 2018 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Fri Apr 26 19:47:23 2019 @@ -212,6 +212,12 @@ get_option(struct dhcpcd_ctx *ctx, } l = *p++; + /* Check we can read the option data, if present */ + if (p + l > e) { + errno = EINVAL; + return NULL; + } + if (o == DHO_OPTSOVERLOADED) { /* Ensure we only get this option once by setting * the last bit as well as the value. @@ -246,10 +252,6 @@ get_option(struct dhcpcd_ctx *ctx, bp += ol; } ol = l; - if (p + ol >= e) { -errno = EINVAL; -return NULL; - } op = p; bl += ol; } Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.3 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.4 --- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.3 Sat Aug 25 15:03:00 2018 +++ src/external/bsd/dhcpcd/dist/src/dhcp6.c Fri Apr 26 19:47:23 2019 @@ -2015,12 +2015,12 @@ dhcp6_findna(struct interface *ifp, uint nd = o + ol; l -= (size_t)(nd - d); d = nd; - if (ol < 24) { + if (ol < sizeof(ia)) { errno = EINVAL; logerrx("%s: IA Address option truncated", ifp->name); continue; } - memcpy(, o, ol); + memcpy(, o, sizeof(ia)); ia.pltime = ntohl(ia.pltime); ia.vltime = ntohl(ia.vltime); /* RFC 3315 22.6 */ Added files: Index: src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h diff -u /dev/null src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h:1.1.1.1.4.2 --- /dev/null Fri Apr 26 19:47:23 2019 +++ src/external/bsd/dhcpcd/dist/compat/consttime_memequal.h Fri Apr 26 19:47:23 2019 @@ -0,0 +1,28 @@ +/* + * Written by Matthias Drochner . + * Public domain. + */ + +#ifndef CONSTTIME_MEMEQUAL_H +#define CONSTTIME_MEMEQUAL_H +inline
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Apr 19 16:02:02 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1689 To generate a diff of this commit: cvs rdiff -u -r1.1.2.47 -r1.1.2.48 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.47 src/doc/CHANGES-7.3:1.1.2.48 --- src/doc/CHANGES-7.3:1.1.2.47 Tue Apr 16 08:12:58 2019 +++ src/doc/CHANGES-7.3 Fri Apr 19 16:02:01 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.47 2019/04/16 08:12:58 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.48 2019/04/19 16:02:01 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -523,3 +523,12 @@ sys/external/bsd/drm2/pci/drm_pci.c 1.3 Don't try to interpret the second half of a 64-bit BAR as another one. [dholland, ticket #1673] +sys/compat/common/uipc_syscalls_40.c 1.19 (patch) +sys/compat/linux/common/linux_socket.c 1.145 (patch) +sys/compat/linux32/common/linux32_socket.c 1.30 (patch) +sys/net/if.c 1.449 (patch) + + Zero out the ifreq struct for SIOCGIFCONF to avoid up to 127 bytes + of stack disclosure. + [christos, ticket #1689] +
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: martin Date: Fri Apr 19 16:01:34 UTC 2019 Modified Files: src/sys/compat/common [netbsd-7]: uipc_syscalls_40.c src/sys/compat/linux/common [netbsd-7]: linux_socket.c src/sys/compat/linux32/common [netbsd-7]: linux32_socket.c src/sys/net [netbsd-7]: if.c Log Message: Pull up following revision(s) via patch (requested by christos in ticket #1689): sys/compat/linux/common/linux_socket.c: revision 1.145 sys/net/if.c: revision 1.449 sys/compat/linux32/common/linux32_socket.c: revision 1.30 sys/compat/common/uipc_syscalls_40.c: revision 1.19 Zero out the ifreq struct for SIOCGIFCONF to avoid up to 127 bytes of stack disclosure. From Andy Nguyen, many thanks! - Zero out the ifreq struct for SIOCGIFCONF to avoid up to 127 bytes of stack disclosure. From Andy Nguyen, many thanks! This is the compat code part pointed out by ozaki-r@ To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.32.1 src/sys/compat/common/uipc_syscalls_40.c cvs rdiff -u -r1.119.2.1 -r1.119.2.2 \ src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/compat/linux32/common/linux32_socket.c cvs rdiff -u -r1.290.2.1 -r1.290.2.2 src/sys/net/if.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/uipc_syscalls_40.c diff -u src/sys/compat/common/uipc_syscalls_40.c:1.7 src/sys/compat/common/uipc_syscalls_40.c:1.7.32.1 --- src/sys/compat/common/uipc_syscalls_40.c:1.7 Wed Jan 19 10:21:16 2011 +++ src/sys/compat/common/uipc_syscalls_40.c Fri Apr 19 16:01:34 2019 @@ -1,9 +1,9 @@ -/* $NetBSD: uipc_syscalls_40.c,v 1.7 2011/01/19 10:21:16 tsutsui Exp $ */ +/* $NetBSD: uipc_syscalls_40.c,v 1.7.32.1 2019/04/19 16:01:34 martin Exp $ */ /* written by Pavel Cahyna, 2006. Public domain. */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.7 2011/01/19 10:21:16 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls_40.c,v 1.7.32.1 2019/04/19 16:01:34 martin Exp $"); /* * System call interface to the socket abstraction. @@ -39,6 +39,7 @@ compat_ifconf(u_long cmd, void *data) int space, error = 0; const int sz = (int)sizeof(ifr); + memset(, 0, sizeof(ifr)); if ((ifrp = ifc->ifc_req) == NULL) space = 0; else Index: src/sys/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.119.2.1 src/sys/compat/linux/common/linux_socket.c:1.119.2.2 --- src/sys/compat/linux/common/linux_socket.c:1.119.2.1 Sat Jan 17 12:10:54 2015 +++ src/sys/compat/linux/common/linux_socket.c Fri Apr 19 16:01:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.119.2.1 2015/01/17 12:10:54 martin Exp $ */ +/* $NetBSD: linux_socket.c,v 1.119.2.2 2019/04/19 16:01:34 martin Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.119.2.1 2015/01/17 12:10:54 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.119.2.2 2019/04/19 16:01:34 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1124,6 +1124,7 @@ linux_getifconf(struct lwp *l, register_ if (error) return error; + memset(, 0, sizeof(ifr)); ifrp = ifc.ifc_req; if (ifrp == NULL) space = 0; Index: src/sys/compat/linux32/common/linux32_socket.c diff -u src/sys/compat/linux32/common/linux32_socket.c:1.18 src/sys/compat/linux32/common/linux32_socket.c:1.18.2.1 --- src/sys/compat/linux32/common/linux32_socket.c:1.18 Sat May 17 21:26:20 2014 +++ src/sys/compat/linux32/common/linux32_socket.c Fri Apr 19 16:01:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_socket.c,v 1.18 2014/05/17 21:26:20 rmind Exp $ */ +/* $NetBSD: linux32_socket.c,v 1.18.2.1 2019/04/19 16:01:34 martin Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.18 2014/05/17 21:26:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.18.2.1 2019/04/19 16:01:34 martin Exp $"); #include #include @@ -423,6 +423,7 @@ linux32_getifconf(struct lwp *l, registe if (error) return error; + memset(, 0, sizeof(ifr)); ifrp = NETBSD32PTR64(ifc.ifc_req); if (ifrp == NULL) space = 0; Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.290.2.1 src/sys/net/if.c:1.290.2.2 --- src/sys/net/if.c:1.290.2.1 Tue Nov 11 12:20:28 2014 +++ src/sys/net/if.c Fri Apr 19 16:01:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.290.2.1 2014/11/11 12:20:28 martin Exp $ */ +/* $NetBSD: if.c,v 1.290.2.2 2019/04/19 16:01:34 martin Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.290.2.1 2014/11/11 12:20:28 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.290.2.2 2019/04/19 16:01:34 martin Exp
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Apr 16 08:12:58 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1673 To generate a diff of this commit: cvs rdiff -u -r1.1.2.46 -r1.1.2.47 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.46 src/doc/CHANGES-7.3:1.1.2.47 --- src/doc/CHANGES-7.3:1.1.2.46 Tue Apr 16 03:56:53 2019 +++ src/doc/CHANGES-7.3 Tue Apr 16 08:12:58 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.46 2019/04/16 03:56:53 msaitoh Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.47 2019/04/16 08:12:58 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -517,3 +517,9 @@ sys/kern/sys_mqueue.c1.44 mq_send1: fix argument validation and reject too large lengths early. Discovered by Andy Nguyen. [martin, ticket #1688] + +sys/external/bsd/drm2/pci/drm_pci.c 1.32 (patch) + + Don't try to interpret the second half of a 64-bit BAR as another one. + [dholland, ticket #1673] +
CVS commit: [netbsd-7] src/sys/external/bsd/drm2/pci
Module Name:src Committed By: martin Date: Tue Apr 16 08:10:22 UTC 2019 Modified Files: src/sys/external/bsd/drm2/pci [netbsd-7]: drm_pci.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1673): sys/external/bsd/drm2/pci/drm_pci.c: revision 1.32 (via patch) Don't try to interpret the second half of a 64-bit BAR as another one. >From msaitoh@. To generate a diff of this commit: cvs rdiff -u -r1.6.2.3 -r1.6.2.4 src/sys/external/bsd/drm2/pci/drm_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/pci/drm_pci.c diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.6.2.3 src/sys/external/bsd/drm2/pci/drm_pci.c:1.6.2.4 --- src/sys/external/bsd/drm2/pci/drm_pci.c:1.6.2.3 Thu Jul 30 15:43:37 2015 +++ src/sys/external/bsd/drm2/pci/drm_pci.c Tue Apr 16 08:10:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: drm_pci.c,v 1.6.2.3 2015/07/30 15:43:37 snj Exp $ */ +/* $NetBSD: drm_pci.c,v 1.6.2.4 2019/04/16 08:10:22 martin Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.6.2.3 2015/07/30 15:43:37 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.6.2.4 2019/04/16 08:10:22 martin Exp $"); #include #include @@ -140,6 +140,14 @@ drm_pci_attach(device_t self, const stru continue; } + /* + * If it's a 64-bit mapping, don't interpret the second + * half of it as another BAR in the next iteration of + * the loop -- move on to the next unit. + */ + if (PCI_MAPREG_MEM_TYPE(type) == PCI_MAPREG_MEM_TYPE_64BIT) + unit++; + /* Inquire about it. We'll map it in drm_core_ioremap. */ if (pci_mapreg_info(pa->pa_pc, pa->pa_tag, reg, type, >bm_base, >bm_size, >bm_flags) != 0) {
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Tue Apr 16 03:56:53 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1688. To generate a diff of this commit: cvs rdiff -u -r1.1.2.45 -r1.1.2.46 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.45 src/doc/CHANGES-7.3:1.1.2.46 --- src/doc/CHANGES-7.3:1.1.2.45 Sat Mar 30 18:47:57 2019 +++ src/doc/CHANGES-7.3 Tue Apr 16 03:56:53 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.45 2019/03/30 18:47:57 bouyer Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.46 2019/04/16 03:56:53 msaitoh Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -512,3 +512,8 @@ sys/arch/amd64/include/param.h 1.30 PR port-amd64/54052. [rin, ticket #1687] +sys/kern/sys_mqueue.c1.44 + + mq_send1: fix argument validation and reject too large lengths early. + Discovered by Andy Nguyen. + [martin, ticket #1688]
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: msaitoh Date: Tue Apr 16 03:52:34 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: sys_mqueue.c Log Message: Pull up following revision(s) (requested by martin in ticket #1688): sys/kern/sys_mqueue.c: revision 1.44 mq_send1: fix argument validation and reject too large lengths early. Discovered by Andy Nguyen. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.36.4.1 src/sys/kern/sys_mqueue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/sys_mqueue.c diff -u src/sys/kern/sys_mqueue.c:1.36 src/sys/kern/sys_mqueue.c:1.36.4.1 --- src/sys/kern/sys_mqueue.c:1.36 Tue Feb 25 18:30:11 2014 +++ src/sys/kern/sys_mqueue.c Tue Apr 16 03:52:34 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_mqueue.c,v 1.36 2014/02/25 18:30:11 pooka Exp $ */ +/* $NetBSD: sys_mqueue.c,v 1.36.4.1 2019/04/16 03:52:34 msaitoh Exp $ */ /* * Copyright (c) 2007-2011 Mindaugas Rasiukevicius @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.36 2014/02/25 18:30:11 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.36.4.1 2019/04/16 03:52:34 msaitoh Exp $"); #include #include @@ -794,6 +794,8 @@ mq_send1(mqd_t mqdes, const char *msg_pt return EINVAL; /* Allocate a new message */ + if (msg_len > mq_max_msgsize) + return EMSGSIZE; size = sizeof(struct mq_msg) + msg_len; if (size > mq_max_msgsize) return EMSGSIZE;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: bouyer Date: Sat Mar 30 18:47:57 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: ticket #1687 To generate a diff of this commit: cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.44 src/doc/CHANGES-7.3:1.1.2.45 --- src/doc/CHANGES-7.3:1.1.2.44 Fri Mar 15 14:37:33 2019 +++ src/doc/CHANGES-7.3 Sat Mar 30 18:47:57 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.44 2019/03/15 14:37:33 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.45 2019/03/30 18:47:57 bouyer Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -500,3 +500,15 @@ lib/libcurses/getch.c1.71 Rename global variable "state" to "_cursesi_state". [rin, ticket #1686] +sys/arch/amd64/include/param.h 1.30 + + Bump STACK_ALIGNBYTES to (16 - 1) to satisfy requirement by AMD64 + System V ABI in kernel level. This is because + (1) for LLDB, we want to bypass libc/csu (and therefore manual stack + alignment in _start), and + (2) rtld in glibc >= 2.23 for Linux/x86_64 requires it. + + Fix SEGV for Linux/x86_64 binaries with glibc >= 2.23, reported as + PR port-amd64/54052. + [rin, ticket #1687] +
CVS commit: [netbsd-7] src/sys/arch/amd64/include
Module Name:src Committed By: bouyer Date: Sat Mar 30 18:47:15 UTC 2019 Modified Files: src/sys/arch/amd64/include [netbsd-7]: param.h Log Message: Pull up following revision(s) (requested by rin in ticket #1687): sys/arch/amd64/include/param.h: revision 1.30 Bump STACK_ALIGNBYTES to (16 - 1) to satisfy requirement by AMD64 System V ABI in kernel level. This is because (1) for LLDB, we want to bypass libc/csu (and therefore manual stack alignment in _start), and (2) rtld in glibc >= 2.23 for Linux/x86_64 requires it. Fix SEGV for Linux/x86_64 binaries with glibc >= 2.23, reported as PR port-amd64/54052. To generate a diff of this commit: cvs rdiff -u -r1.18.14.1 -r1.18.14.2 src/sys/arch/amd64/include/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/include/param.h diff -u src/sys/arch/amd64/include/param.h:1.18.14.1 src/sys/arch/amd64/include/param.h:1.18.14.2 --- src/sys/arch/amd64/include/param.h:1.18.14.1 Sun Mar 26 16:05:40 2017 +++ src/sys/arch/amd64/include/param.h Sat Mar 30 18:47:15 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.18.14.1 2017/03/26 16:05:40 snj Exp $ */ +/* $NetBSD: param.h,v 1.18.14.2 2019/03/30 18:47:15 bouyer Exp $ */ #ifdef __x86_64__ @@ -19,6 +19,13 @@ #define ALIGNED_POINTER(p,t) 1 +/* + * Align stack as required by AMD64 System V ABI. This is because + * (1) we want to bypass libc/csu in LLDB, and + * (2) rtld in glibc >= 2.23 for Linux/x86_64 requires it. + */ +#define STACK_ALIGNBYTES (16 - 1) + #define ALIGNBYTES32 (sizeof(int) - 1) #define ALIGN32(p) (((u_long)(p) + ALIGNBYTES32) &~ALIGNBYTES32)
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Mar 15 14:37:33 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1686 To generate a diff of this commit: cvs rdiff -u -r1.1.2.43 -r1.1.2.44 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.43 src/doc/CHANGES-7.3:1.1.2.44 --- src/doc/CHANGES-7.3:1.1.2.43 Wed Mar 13 12:34:15 2019 +++ src/doc/CHANGES-7.3 Fri Mar 15 14:37:33 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.43 2019/03/13 12:34:15 msaitoh Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.44 2019/03/15 14:37:33 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -493,3 +493,10 @@ sys/arch/mvme68k/dev/pcctwo_68k.c 1.11 Fix small (but fatal) oversight in device/softc split. [martin, ticket #1685] + +lib/libcurses/get_wch.c1.21 +lib/libcurses/getch.c1.71 + + Rename global variable "state" to "_cursesi_state". + [rin, ticket #1686] +
CVS commit: [netbsd-7] src/lib/libcurses
Module Name:src Committed By: martin Date: Fri Mar 15 14:36:22 UTC 2019 Modified Files: src/lib/libcurses [netbsd-7]: get_wch.c getch.c Log Message: Pull up following revision(s) (requested by rin in ticket #1686): lib/libcurses/get_wch.c: revision 1.21 lib/libcurses/getch.c: revision 1.71 Rename global variable "state" to "_cursesi_state". Until now, if application happens to have a global variable of the same name, it was overridden by curses routines. This is the scenario in which aspell crashes when linked to our curses, reported in pkg/44005. We need to wipe out global/static variables like "_cursesi_state" or "wstate" for thread safety. But it would be a future task... XXX pullup to netbsd-8 and netbsd-7 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.10.1 src/lib/libcurses/get_wch.c cvs rdiff -u -r1.59 -r1.59.10.1 src/lib/libcurses/getch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/get_wch.c diff -u src/lib/libcurses/get_wch.c:1.10 src/lib/libcurses/get_wch.c:1.10.10.1 --- src/lib/libcurses/get_wch.c:1.10 Fri Jun 29 10:40:29 2012 +++ src/lib/libcurses/get_wch.c Fri Mar 15 14:36:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: get_wch.c,v 1.10 2012/06/29 10:40:29 blymn Exp $ */ +/* $NetBSD: get_wch.c,v 1.10.10.1 2019/03/15 14:36:22 martin Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation Inc. @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: get_wch.c,v 1.10 2012/06/29 10:40:29 blymn Exp $"); +__RCSID("$NetBSD: get_wch.c,v 1.10.10.1 2019/03/15 14:36:22 martin Exp $"); #endif /* not lint */ #include @@ -48,9 +48,9 @@ __RCSID("$NetBSD: get_wch.c,v 1.10 2012/ #include "keymap.h" #ifdef HAVE_WCHAR -static short wstate; /* state of the wcinkey function */ +static short wstate; /* state of the wcinkey function */ #endif /* HAVE_WCHAR */ -extern short state; /* storage declared in getch.c */ +extern short _cursesi_state; /* storage declared in getch.c */ /* prototypes for private functions */ #ifdef HAVE_WCHAR @@ -222,7 +222,7 @@ inkey(wchar_t *wc, int to, int delay) *working = *start = ( *start + 1 ) % MAX_CBUF_SIZE; if (*start == *end) { - state = wstate = INKEY_NORM; + _cursesi_state = wstate = INKEY_NORM; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "inkey: WCASSEMBLING=>NORM, " @@ -230,7 +230,7 @@ inkey(wchar_t *wc, int to, int delay) *start, *working, *end); #endif /* DEBUG */ } else { - state = wstate = INKEY_BACKOUT; + _cursesi_state = wstate = INKEY_BACKOUT; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "inkey: WCASSEMBLING=>BACKOUT, " @@ -289,7 +289,7 @@ inkey(wchar_t *wc, int to, int delay) } if (*start == *end) { /* only one char processed */ - state = wstate = INKEY_NORM; + _cursesi_state = wstate = INKEY_NORM; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "inkey: WCASSEMBLING=>NORM, " @@ -298,7 +298,7 @@ inkey(wchar_t *wc, int to, int delay) #endif /* DEBUG */ } else { /* otherwise we must have more than one char to backout */ - state = wstate = INKEY_BACKOUT; + _cursesi_state = wstate = INKEY_BACKOUT; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "inkey: WCASSEMBLING=>BACKOUT, " @@ -385,7 +385,7 @@ inkey(wchar_t *wc, int to, int delay) } if (*start == *end) { /* only one char processed */ -state = wstate = INKEY_NORM; +_cursesi_state = wstate = INKEY_NORM; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "inkey: Empty cbuf=>NORM, " @@ -394,7 +394,7 @@ inkey(wchar_t *wc, int to, int delay) #endif /* DEBUG */ } else { /* otherwise we must have more than one char to backout */ -state = wstate = INKEY_BACKOUT; +_cursesi_state = wstate = INKEY_BACKOUT; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "inkey: Non-empty cbuf=>BACKOUT, " @@ -418,7 +418,7 @@ inkey(wchar_t *wc, int to, int delay) #endif /* DEBUG */ if (*start == *end) { /* if it is go back to normal */ - state = wstate = INKEY_NORM; + _cursesi_state = wstate = INKEY_NORM; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "[inkey]=>NORM, start(%d), " @@ -427,7 +427,7 @@ inkey(wchar_t *wc, int to, int delay) #endif /* DEBUG */ } else { /* otherwise go to backout state */ - state = wstate = INKEY_BACKOUT; + _cursesi_state = wstate = INKEY_BACKOUT; #ifdef DEBUG __CTRACE(__CTRACE_INPUT, "[inkey]=>BACKOUT, start(%d), " Index: src/lib/libcurses/getch.c diff -u src/lib/libcurses/getch.c:1.59 src/lib/libcurses/getch.c:1.59.10.1 --- src/lib/libcurses/getch.c:1.59 Sat Apr 21 12:27:28 2012 +++ src/lib/libcurses/getch.c Fri Mar 15 14:36:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: getch.c,v 1.59 2012/04/21 12:27:28 roy Exp $ */ +/* $NetBSD: getch.c,v 1.59.10.1 2019/03/15 14:36:22 martin Exp $ */ /* *
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Wed Mar 13 12:34:15 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket 1683-1685. To generate a diff of this commit: cvs rdiff -u -r1.1.2.42 -r1.1.2.43 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.42 src/doc/CHANGES-7.3:1.1.2.43 --- src/doc/CHANGES-7.3:1.1.2.42 Thu Mar 7 16:49:40 2019 +++ src/doc/CHANGES-7.3 Wed Mar 13 12:34:15 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.42 2019/03/07 16:49:40 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.43 2019/03/13 12:34:15 msaitoh Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -479,3 +479,17 @@ sys/dev/scsipi/st.c1.236 (patch), 1. st(4): Fix (but disable by default) SUN compatibility mode. [kardel, ticket #1682] +sys/compat/netbsd32/netbsd32_compat_60.c 1.3 + + Don't forget to convert the timespec. + [martin, ticket #1683] + +external/bsd/bzip2/dist/bzip2recover.c 1.4 + + Apply fix for CVE-2016-3189 bzip2: heap use after free in bzip2recover + [martin, ticket #1684] + +sys/arch/mvme68k/dev/pcctwo_68k.c 1.11 + + Fix small (but fatal) oversight in device/softc split. + [martin, ticket #1685]
CVS commit: [netbsd-7] src/sys/arch/mvme68k/dev
Module Name:src Committed By: msaitoh Date: Wed Mar 13 11:47:40 UTC 2019 Modified Files: src/sys/arch/mvme68k/dev [netbsd-7]: pcctwo_68k.c Log Message: Pull up following revision(s) (requested by martin in ticket #1685): sys/arch/mvme68k/dev/pcctwo_68k.c: revision 1.11 Fix small (but fatal) oversight in device/softc split. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.12.1 src/sys/arch/mvme68k/dev/pcctwo_68k.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mvme68k/dev/pcctwo_68k.c diff -u src/sys/arch/mvme68k/dev/pcctwo_68k.c:1.10 src/sys/arch/mvme68k/dev/pcctwo_68k.c:1.10.12.1 --- src/sys/arch/mvme68k/dev/pcctwo_68k.c:1.10 Sat Oct 27 17:18:04 2012 +++ src/sys/arch/mvme68k/dev/pcctwo_68k.c Wed Mar 13 11:47:40 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pcctwo_68k.c,v 1.10 2012/10/27 17:18:04 chs Exp $ */ +/* $NetBSD: pcctwo_68k.c,v 1.10.12.1 2019/03/13 11:47:40 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcctwo_68k.c,v 1.10 2012/10/27 17:18:04 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcctwo_68k.c,v 1.10.12.1 2019/03/13 11:47:40 msaitoh Exp $"); #include #include @@ -187,6 +187,7 @@ pcctwoattach(device_t parent, device_t s uint8_t cid; sc = sys_pcctwo = device_private(self); + sc->sc_dev = self; ma = aux; /* Get a handle to the PCCChip2's registers */
CVS commit: [netbsd-7] src/external/bsd/bzip2/dist
Module Name:src Committed By: msaitoh Date: Wed Mar 13 11:29:28 UTC 2019 Modified Files: src/external/bsd/bzip2/dist [netbsd-7]: bzip2recover.c Log Message: Pull up following revision(s) (requested by martin in ticket #1684): external/bsd/bzip2/dist/bzip2recover.c: revision 1.4 Apply fix for CVE-2016-3189 bzip2: heap use after free in bzip2recover To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.14.1 src/external/bsd/bzip2/dist/bzip2recover.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/bzip2/dist/bzip2recover.c diff -u src/external/bsd/bzip2/dist/bzip2recover.c:1.3 src/external/bsd/bzip2/dist/bzip2recover.c:1.3.14.1 --- src/external/bsd/bzip2/dist/bzip2recover.c:1.3 Mon May 7 00:45:47 2012 +++ src/external/bsd/bzip2/dist/bzip2recover.c Wed Mar 13 11:29:28 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bzip2recover.c,v 1.3 2012/05/07 00:45:47 wiz Exp $ */ +/* $NetBSD: bzip2recover.c,v 1.3.14.1 2019/03/13 11:29:28 msaitoh Exp $ */ /*---*/ /*--- Block recoverer program for bzip2 ---*/ @@ -472,6 +472,7 @@ Int32 main ( Int32 argc, Char** argv ) bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); bsPutUInt32 ( bsWr, blockCRC ); bsClose ( bsWr ); +outFile = NULL; } if (wrBlock >= rbCtr) break; wrBlock++;
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: msaitoh Date: Wed Mar 13 11:13:48 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_60.c Log Message: Pull up following revision(s) (requested by martin in ticket #1683): sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.3 don't forget to convert the timespec. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/compat/netbsd32/netbsd32_compat_60.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_compat_60.c diff -u src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1 src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1.14.1 --- src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1 Fri Mar 29 01:13:54 2013 +++ src/sys/compat/netbsd32/netbsd32_compat_60.c Wed Mar 13 11:13:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $ */ +/* $NetBSD: netbsd32_compat_60.c,v 1.1.14.1 2019/03/13 11:13:48 msaitoh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.1.14.1 2019/03/13 11:13:48 msaitoh Exp $"); #include #include @@ -71,6 +71,7 @@ compat_60_netbsd32__lwp_park(struct lwp error = copyin(SCARG_P32(uap, ts), , sizeof ts32); if (error != 0) return error; + netbsd32_to_timespec(, ); tsp = }
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Mar 7 16:49:40 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1682 To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.41 src/doc/CHANGES-7.3:1.1.2.42 --- src/doc/CHANGES-7.3:1.1.2.41 Sun Feb 24 10:54:02 2019 +++ src/doc/CHANGES-7.3 Thu Mar 7 16:49:40 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.41 2019/02/24 10:54:02 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.42 2019/03/07 16:49:40 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -472,3 +472,10 @@ sys/kern/kern_time.c1.196 Avoid panic from setitimer(2) for CLOCK_MONOTONIC. [mlelstv, ticket #1196] +sys/dev/scsipi/files.scsipi 1.42 +sys/dev/scsipi/st.c1.236 (patch), 1.237 + + PR kern/53949: fix file mark handling. + st(4): Fix (but disable by default) SUN compatibility mode. + [kardel, ticket #1682] +
CVS commit: [netbsd-7] src/sys/dev/scsipi
Module Name:src Committed By: martin Date: Thu Mar 7 16:49:10 UTC 2019 Modified Files: src/sys/dev/scsipi [netbsd-7]: files.scsipi st.c Log Message: Pull up following revision(s) (requested by kardel in ticket #1682): sys/dev/scsipi/st.c: revision 1.236 (patch) sys/dev/scsipi/st.c: revision 1.237 sys/dev/scsipi/files.scsipi: revision 1.42 Fix PR kern/53949: Fix inconsistent/incomplete file mark handling to conform again to mtio(4) at close(2) time. This was necessary as the PREVENT/ALLOW bracket was reduced from a whole mount session to cover only the open(2)/close(2) time on ~2002-03-22. The rationale was to allow robots and humans to change the media during a mount session. Unfortunately this lead to file marks being written to potentially other media at the beginning on drives that used the two file marks as EOM pattern. In order for that to happen the media had to be removed after data and at most one file mark had been written before removal. The mount error message has been clarified and a warning about potential data/file mark lossage on UNIT ATTENTION during an active mount session with unfinished file marks has been added. While there, fix, but disable the commented SUN compatibility to write final file marks by opening and immediately closing the device in O_WRONLY mode. That code has not been working since around 1998. It can now be enabled with options ST_SUNCOMPAT. Additionally debug output coverage has been extended. Correct printing type of b_blkno (int64_t) in st.c Fixes build with kUBSan on NetBSD/i386. Fix, but disable the commented SUN compatibility in st.c to write final file marks by opening and immediately closing the device in O_WRONLY mode. That code has not been working since around 1998. It can now be enabled with options ST_SUNCOMPAT. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.138.1 src/sys/dev/scsipi/files.scsipi cvs rdiff -u -r1.226 -r1.226.2.1 src/sys/dev/scsipi/st.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/scsipi/files.scsipi diff -u src/sys/dev/scsipi/files.scsipi:1.41 src/sys/dev/scsipi/files.scsipi:1.41.138.1 --- src/sys/dev/scsipi/files.scsipi:1.41 Sun Dec 11 12:23:50 2005 +++ src/sys/dev/scsipi/files.scsipi Thu Mar 7 16:49:10 2019 @@ -1,11 +1,12 @@ -# $NetBSD: files.scsipi,v 1.41 2005/12/11 12:23:50 christos Exp $ +# $NetBSD: files.scsipi,v 1.41.138.1 2019/03/07 16:49:10 martin Exp $ # # Config file and device description for machine-independent SCSI code. # Included by ports that need it. Ports that use it must provide # their own "major" declarations for the appropriate devices. defflag opt_scsi.h SCSIVERBOSE ST_ENABLE_EARLYWARN -SES_ENABLE_PASSTHROUGH SCSI_OLD_NOINQUIRY +ST_SUNCOMPAT SES_ENABLE_PASSTHROUGH +SCSI_OLD_NOINQUIRY defparam opt_scsi.h ST_MOUNT_DELAY SDRETRIES SD_IO_TIMEOUT defflag opt_scsipi_debug.h SCSIPI_DEBUG Index: src/sys/dev/scsipi/st.c diff -u src/sys/dev/scsipi/st.c:1.226 src/sys/dev/scsipi/st.c:1.226.2.1 --- src/sys/dev/scsipi/st.c:1.226 Sun Aug 10 16:44:36 2014 +++ src/sys/dev/scsipi/st.c Thu Mar 7 16:49:10 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: st.c,v 1.226 2014/08/10 16:44:36 tls Exp $ */ +/* $NetBSD: st.c,v 1.226.2.1 2019/03/07 16:49:10 martin Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.226 2014/08/10 16:44:36 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: st.c,v 1.226.2.1 2019/03/07 16:49:10 martin Exp $"); #include "opt_scsi.h" @@ -605,6 +605,30 @@ stopen(dev_t dev, int flags, int mode, s */ if ((st->flags & ST_MOUNTED) || ST_MOUNT_DELAY == 0 || (st->mt_key != SKEY_NOT_READY)) { + device_printf(st->sc_dev, + "mount error (sense key=%d) - " + "terminating mount session\n", + st->mt_key); + /* + * the following should not trigger unless + * something serious happened while the device + * was open (PREVENT MEDIUM REMOVAL in effect) + */ + if (st->flags & ST_WRITTEN && + st->mt_key == SKEY_UNIT_ATTENTION) { +/* + * device / media state may have changed + * refrain from writing missing file marks + * onto potentially newly inserted/formatted + * media (e. g. emergency EJECT/RESET/etc.) + */ +st->flags &= ~(ST_WRITTEN|ST_FM_WRITTEN); + +device_printf(st->sc_dev, +"CAUTION: file marks/data may be missing" +" - ASC = 0x%02x, ASCQ = 0x%02x\n", + st->asc, st->ascq); + } goto bad; } @@ -713,15 +737,30 @@ stclose(dev_t dev, int flags, int mode, */ stxx = st->flags & (ST_WRITTEN | ST_FM_WRITTEN); - if (((flags & FWRITE) && stxx == ST_WRITTEN) || - ((flags & O_ACCMODE) == FWRITE && stxx == 0)) { - int nm; + if ((flags & FWRITE) != 0) { + int nm
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sun Feb 24 10:54:02 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1196 To generate a diff of this commit: cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.40 src/doc/CHANGES-7.3:1.1.2.41 --- src/doc/CHANGES-7.3:1.1.2.40 Sat Feb 23 07:18:00 2019 +++ src/doc/CHANGES-7.3 Sun Feb 24 10:54:02 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.40 2019/02/23 07:18:00 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.41 2019/02/24 10:54:02 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -467,4 +467,8 @@ sys/net/rtsock.c (patch) Fix locking for sysctl_rtable. [sborrill, ticket #1680] +sys/kern/kern_time.c1.196 + + Avoid panic from setitimer(2) for CLOCK_MONOTONIC. + [mlelstv, ticket #1196]
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Sun Feb 24 10:53:32 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: kern_time.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1196): sys/kern/kern_time.c: revision 1.196 The callout is used by any nonvirtual timer including CLOCK_MONOTONIC and needs to be initialized. Detected by [syzkaller]. To generate a diff of this commit: cvs rdiff -u -r1.179.8.5 -r1.179.8.6 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.179.8.5 src/sys/kern/kern_time.c:1.179.8.6 --- src/sys/kern/kern_time.c:1.179.8.5 Fri Feb 1 11:06:20 2019 +++ src/sys/kern/kern_time.c Sun Feb 24 10:53:32 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.179.8.5 2019/02/01 11:06:20 martin Exp $ */ +/* $NetBSD: kern_time.c,v 1.179.8.6 2019/02/24 10:53:32 martin Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.5 2019/02/01 11:06:20 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.6 2019/02/24 10:53:32 martin Exp $"); #include #include @@ -1141,7 +1141,7 @@ dosetitimer(struct proc *p, int which, s pt->pt_type = which; pt->pt_entry = which; pt->pt_queued = false; - if (pt->pt_type == CLOCK_REALTIME) + if (!CLOCK_VIRTUAL_P(which)) callout_init(>pt_ch, CALLOUT_MPSAFE); else pt->pt_active = 0;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sat Feb 23 07:18:00 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1679 and #1680 To generate a diff of this commit: cvs rdiff -u -r1.1.2.39 -r1.1.2.40 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.39 src/doc/CHANGES-7.3:1.1.2.40 --- src/doc/CHANGES-7.3:1.1.2.39 Fri Feb 1 11:07:54 2019 +++ src/doc/CHANGES-7.3 Sat Feb 23 07:18:00 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.39 2019/02/01 11:07:54 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.40 2019/02/23 07:18:00 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -443,3 +443,28 @@ sys/kern/kern_time.c1.190,1.194 Fix kernel info leaks. [maxv, ticket #1678] +sys/compat/linux/common/linux_ipc.c 1.56 +sys/compat/linux32/common/linux32_ipccall.c 1.12 +sys/compat/netbsd32/netbsd32_compat_14.c 1.28 +sys/compat/netbsd32/netbsd32_compat_14.c 1.29 +sys/compat/netbsd32/netbsd32_conv.h 1.38 +sys/compat/sys/ipc.h1.6 +sys/compat/sys/ipc.h1.7 +sys/compat/sys/msg.h1.6 +sys/compat/sys/sem.h1.7 +sys/compat/sys/shm.h1.8 +sys/kern/sysv_msg.c1.73 +sys/kern/sysv_sem.c1.96 +sys/kern/sysv_shm.c1.133 + + Fix kernel stack and kernel adddress leaks in msgctl, semctl, and + shmctl system calls, for native as well as for the netbsd32, linux, + and linux32 compatibility calls. + [mrg, ticket #1679] + +sys/net/rtsock.c (patch) + + Fix locking for sysctl_rtable. + [sborrill, ticket #1680] + +
CVS commit: [netbsd-7] src/sys/net
Module Name:src Committed By: martin Date: Sat Feb 23 07:17:37 UTC 2019 Modified Files: src/sys/net [netbsd-7]: rtsock.c Log Message: Apply patch, requested by sborrill in ticket #1680: sys/net/rtsock.c(apply patch) Fix locking for sysctl_rtable (fix in HEAD will be different). To generate a diff of this commit: cvs rdiff -u -r1.163.2.1 -r1.163.2.2 src/sys/net/rtsock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/rtsock.c diff -u src/sys/net/rtsock.c:1.163.2.1 src/sys/net/rtsock.c:1.163.2.2 --- src/sys/net/rtsock.c:1.163.2.1 Wed Nov 28 16:30:06 2018 +++ src/sys/net/rtsock.c Sat Feb 23 07:17:37 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.163.2.1 2018/11/28 16:30:06 martin Exp $ */ +/* $NetBSD: rtsock.c,v 1.163.2.2 2019/02/23 07:17:37 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.163.2.1 2018/11/28 16:30:06 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.163.2.2 2019/02/23 07:17:37 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1408,6 +1408,8 @@ again: w.w_needed = 0 - w.w_given; w.w_where = where; + mutex_enter(softnet_lock); + KERNEL_LOCK(1, NULL); s = splsoftnet(); switch (w.w_op) { @@ -1434,6 +1436,8 @@ again: break; } splx(s); + KERNEL_UNLOCK_ONE(NULL); + mutex_exit(softnet_lock); /* check to see if we couldn't allocate memory with NOWAIT */ if (error == ENOBUFS && w.w_tmem == 0 && w.w_tmemneeded)
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: martin Date: Sat Feb 23 07:02:21 UTC 2019 Modified Files: src/sys/compat/linux/common [netbsd-7]: linux_ipc.c src/sys/compat/linux32/common [netbsd-7]: linux32_ipccall.c src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_14.c netbsd32_conv.h src/sys/compat/sys [netbsd-7]: ipc.h msg.h sem.h shm.h src/sys/kern [netbsd-7]: sysv_msg.c sysv_sem.c sysv_shm.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1679): sys/compat/sys/ipc.h: revision 1.6 sys/compat/sys/ipc.h: revision 1.7 sys/compat/sys/shm.h: revision 1.8 sys/kern/sysv_shm.c: revision 1.133 sys/compat/sys/sem.h: revision 1.7 sys/compat/linux/common/linux_ipc.c: revision 1.56 sys/compat/netbsd32/netbsd32_conv.h: revision 1.38 sys/kern/sysv_sem.c: revision 1.96 sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.28 sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.29 sys/compat/linux32/common/linux32_ipccall.c: revision 1.12 sys/kern/sysv_msg.c: revision 1.73 sys/compat/sys/msg.h: revision 1.6 for sysv ipc stat operations, explicitly copy the exported parts instead of the whole ds structure. besides triggering a recently added assert in netbsd32, this stops exposing kernel addresses. copy the mode clamping to 0777 from sem to shm and msg. while here, make sure that the compat callers to sysv_ipc clear the contents of the compat structure before setting the result members to ensure padding bytes are cleared. don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal. even if used, which seems very dodgy, they leak KVAs as well. possibly this may affect linux binaries, in particular, the comments around _shm_internal ("XXX Oh well.") may mean apps rely upon these but hopefully not -- the comments date back to rev 1.1 in 1995. the _key, _seq and _msg_cbytes members are exported as before as i found multiple consumers of these (no less than ipcs(1), and they appear to be useful for debugging and more. XXX: the naming of compat functions have too many styles. there are at least 3 different ones changed here. fix naming errors in previous. (this file is no longer compiled, but this fix makes the pull up more obvious, before deleting this file.) include libkern.h or strings.h. should fix i386 build issues. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.30.1 src/sys/compat/linux/common/linux_ipc.c cvs rdiff -u -r1.11 -r1.11.34.1 \ src/sys/compat/linux32/common/linux32_ipccall.c cvs rdiff -u -r1.21.74.1 -r1.21.74.2 \ src/sys/compat/netbsd32/netbsd32_compat_14.c cvs rdiff -u -r1.28.4.2 -r1.28.4.3 src/sys/compat/netbsd32/netbsd32_conv.h cvs rdiff -u -r1.4 -r1.4.30.1 src/sys/compat/sys/ipc.h cvs rdiff -u -r1.4.40.1 -r1.4.40.2 src/sys/compat/sys/msg.h cvs rdiff -u -r1.6 -r1.6.40.1 src/sys/compat/sys/sem.h cvs rdiff -u -r1.7 -r1.7.38.1 src/sys/compat/sys/shm.h cvs rdiff -u -r1.66 -r1.66.4.1 src/sys/kern/sysv_msg.c cvs rdiff -u -r1.90 -r1.90.4.1 src/sys/kern/sysv_sem.c cvs rdiff -u -r1.125 -r1.125.2.1 src/sys/kern/sysv_shm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_ipc.c diff -u src/sys/compat/linux/common/linux_ipc.c:1.55 src/sys/compat/linux/common/linux_ipc.c:1.55.30.1 --- src/sys/compat/linux/common/linux_ipc.c:1.55 Sat May 28 23:24:58 2011 +++ src/sys/compat/linux/common/linux_ipc.c Sat Feb 23 07:02:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipc.c,v 1.55 2011/05/28 23:24:58 alnsn Exp $ */ +/* $NetBSD: linux_ipc.c,v 1.55.30.1 2019/02/23 07:02:20 martin Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.55 2011/05/28 23:24:58 alnsn Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.55.30.1 2019/02/23 07:02:20 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -117,6 +117,7 @@ void bsd_to_linux_ipc_perm(struct ipc_perm *bpp, struct linux_ipc_perm *lpp) { + memset(lpp, 0, sizeof *lpp); lpp->l_key = bpp->_key; lpp->l_uid = bpp->uid; lpp->l_gid = bpp->gid; @@ -129,6 +130,8 @@ bsd_to_linux_ipc_perm(struct ipc_perm *b void bsd_to_linux_ipc64_perm(struct ipc_perm *bpp, struct linux_ipc64_perm *lpp) { + + memset(lpp, 0, sizeof *lpp); lpp->l_key = bpp->_key; lpp->l_uid = bpp->uid; lpp->l_gid = bpp->gid; @@ -152,16 +155,19 @@ bsd_to_linux_ipc64_perm(struct ipc_perm void bsd_to_linux_semid_ds(struct semid_ds *bs, struct linux_semid_ds *ls) { + + memset(ls, 0, sizeof *ls); bsd_to_linux_ipc_perm(>sem_perm, >l_sem_perm); ls->l_sem_otime = bs->sem_otime; ls->l_sem_ctime = bs->sem_ctime; ls->l_sem_nsems = bs->sem_nsems; - ls->l_sem_base = bs->_sem_base; } void bsd_to_linux_semid64_ds(struct semid_ds *bs, struct
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Feb 1 11:07:54 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1678 To generate a diff of this commit: cvs rdiff -u -r1.1.2.38 -r1.1.2.39 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.38 src/doc/CHANGES-7.3:1.1.2.39 --- src/doc/CHANGES-7.3:1.1.2.38 Wed Jan 30 13:28:09 2019 +++ src/doc/CHANGES-7.3 Fri Feb 1 11:07:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.38 2019/01/30 13:28:09 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.39 2019/02/01 11:07:54 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -438,3 +438,8 @@ sys/arch/vax/vax/sig_machdep.c 1.23 Fix widespread leak in the sendsig_siginfo() functions. [maxv, ticket #1677] +sys/kern/kern_time.c1.190,1.194 + + Fix kernel info leaks. + [maxv, ticket #1678] +
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Fri Feb 1 11:06:20 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1678): sys/kern/kern_time.c: revision 1.190 sys/kern/kern_time.c: revision 1.194 Fix stack info leak. There are 4 bytes of padding in struct timeval. Looks like there are other leaks related to timeval in this file. [ 133.414352] kleak: Possible leak in copyout: [len=16, leaked=4] [ 133.414352] #0 0x80224d0a in kleak_note [ 133.424360] #1 0x80224d8a in kleak_copyout [ 133.434361] #2 0x80b5fd79 in sys___gettimeofday50 [ 133.434361] #3 0x8025a89c in sy_call [ 133.444351] #4 0x8025aace in sy_invoke [ 133.454365] #5 0x8025ab54 in syscall - Fix kernel info leaks. To generate a diff of this commit: cvs rdiff -u -r1.179.8.4 -r1.179.8.5 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.179.8.4 src/sys/kern/kern_time.c:1.179.8.5 --- src/sys/kern/kern_time.c:1.179.8.4 Thu Dec 27 12:00:10 2018 +++ src/sys/kern/kern_time.c Fri Feb 1 11:06:20 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.179.8.4 2018/12/27 12:00:10 martin Exp $ */ +/* $NetBSD: kern_time.c,v 1.179.8.5 2019/02/01 11:06:20 martin Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.4 2018/12/27 12:00:10 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.5 2019/02/01 11:06:20 martin Exp $"); #include #include @@ -388,6 +388,7 @@ sys___gettimeofday50(struct lwp *l, cons struct timezone tzfake; if (SCARG(uap, tp)) { + memset(, 0, sizeof(atv)); microtime(); error = copyout(, SCARG(uap, tp), sizeof(atv)); if (error) @@ -487,6 +488,7 @@ adjtime1(const struct timeval *delta, st extern int64_t time_adjtime; /* in kern_ntptime.c */ if (olddelta) { + memset(olddelta, 0, sizeof(*olddelta)); mutex_spin_enter(_lock); olddelta->tv_sec = time_adjtime / 100; olddelta->tv_usec = time_adjtime % 100;
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Jan 30 13:28:09 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1677 To generate a diff of this commit: cvs rdiff -u -r1.1.2.37 -r1.1.2.38 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.37 src/doc/CHANGES-7.3:1.1.2.38 --- src/doc/CHANGES-7.3:1.1.2.37 Tue Jan 29 08:31:23 2019 +++ src/doc/CHANGES-7.3 Wed Jan 30 13:28:09 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.37 2019/01/29 08:31:23 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.38 2019/01/30 13:28:09 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -418,3 +418,23 @@ sys/netnatm/natm.cpatch sendoob() functions are expected to free both passed mbuf chains. [martin, ticket #1676] + +sys/arch/alpha/alpha/machdep.c 1.352 +sys/arch/amd64/amd64/netbsd32_machdep.c 1.117 +sys/arch/arm/arm/sig_machdep.c 1.51 +sys/arch/hppa/hppa/sig_machdep.c 1.26 +sys/arch/i386/i386/machdep.c 1.813 +sys/arch/m68k/m68k/sig_machdep.c 1.50 +sys/arch/mips/mips/netbsd32_machdep.c 1.16 +sys/arch/mips/mips/sig_machdep.c 1.24 +sys/arch/powerpc/powerpc/sig_machdep.c 1.46 +sys/arch/sh3/sh3/sh3_machdep.c 1.106 +sys/arch/sparc64/sparc64/machdep.c 1.289 +sys/arch/sparc64/sparc64/netbsd32_machdep.c 1.111 +sys/arch/usermode/target/i386/cpu_i386.c 1.8 +sys/arch/usermode/target/x86_64/cpu_x86_64.c 1.7 +sys/arch/vax/vax/sig_machdep.c 1.23 + + Fix widespread leak in the sendsig_siginfo() functions. + [maxv, ticket #1677] +
CVS commit: [netbsd-7] src/sys/arch
Module Name:src Committed By: martin Date: Wed Jan 30 13:27:28 UTC 2019 Modified Files: src/sys/arch/alpha/alpha [netbsd-7]: machdep.c src/sys/arch/amd64/amd64 [netbsd-7]: netbsd32_machdep.c src/sys/arch/arm/arm [netbsd-7]: sig_machdep.c src/sys/arch/hppa/hppa [netbsd-7]: sig_machdep.c src/sys/arch/i386/i386 [netbsd-7]: machdep.c src/sys/arch/m68k/m68k [netbsd-7]: sig_machdep.c src/sys/arch/mips/mips [netbsd-7]: netbsd32_machdep.c sig_machdep.c src/sys/arch/powerpc/powerpc [netbsd-7]: sig_machdep.c src/sys/arch/sh3/sh3 [netbsd-7]: sh3_machdep.c src/sys/arch/sparc64/sparc64 [netbsd-7]: machdep.c netbsd32_machdep.c src/sys/arch/usermode/target/i386 [netbsd-7]: cpu_i386.c src/sys/arch/usermode/target/x86_64 [netbsd-7]: cpu_x86_64.c src/sys/arch/vax/vax [netbsd-7]: sig_machdep.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1677): sys/arch/hppa/hppa/sig_machdep.c: revision 1.26 sys/arch/arm/arm/sig_machdep.c: revision 1.51 sys/arch/i386/i386/machdep.c: revision 1.813 sys/arch/alpha/alpha/machdep.c: revision 1.352 sys/arch/m68k/m68k/sig_machdep.c: revision 1.50 sys/arch/usermode/target/i386/cpu_i386.c: revision 1.8 sys/arch/sparc64/sparc64/machdep.c: revision 1.289 sys/arch/sparc64/sparc64/netbsd32_machdep.c: revision 1.111 sys/arch/powerpc/powerpc/sig_machdep.c: revision 1.46 sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.117 sys/arch/sh3/sh3/sh3_machdep.c: revision 1.106 sys/arch/mips/mips/netbsd32_machdep.c: revision 1.16 sys/arch/mips/mips/sig_machdep.c: revision 1.24 sys/arch/usermode/target/x86_64/cpu_x86_64.c: revision 1.7 sys/arch/vax/vax/sig_machdep.c: revision 1.23 Fix widespread leak in the sendsig_siginfo() functions. sigframe_siginfo has padding, so zero it out properly. While here I'm also zeroing out some other things in several ports, for safety. Same problem in netbsd32, so fix that too. I can't compile-test on each architecture, but there should be no breakage (tm). Overall this fixes at least 14 info leaks. Prompted by the discovery by KLEAK of a leak in amd64's sendsig_siginfo. To generate a diff of this commit: cvs rdiff -u -r1.345.2.1 -r1.345.2.2 src/sys/arch/alpha/alpha/machdep.c cvs rdiff -u -r1.92 -r1.92.4.1 src/sys/arch/amd64/amd64/netbsd32_machdep.c cvs rdiff -u -r1.47 -r1.47.4.1 src/sys/arch/arm/arm/sig_machdep.c cvs rdiff -u -r1.25 -r1.25.30.1 src/sys/arch/hppa/hppa/sig_machdep.c cvs rdiff -u -r1.752.4.2 -r1.752.4.3 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.49 -r1.49.14.1 src/sys/arch/m68k/m68k/sig_machdep.c cvs rdiff -u -r1.11 -r1.11.4.1 src/sys/arch/mips/mips/netbsd32_machdep.c cvs rdiff -u -r1.23 -r1.23.28.1 src/sys/arch/mips/mips/sig_machdep.c cvs rdiff -u -r1.43.14.1 -r1.43.14.2 \ src/sys/arch/powerpc/powerpc/sig_machdep.c cvs rdiff -u -r1.102.4.1 -r1.102.4.2 src/sys/arch/sh3/sh3/sh3_machdep.c cvs rdiff -u -r1.278.2.3 -r1.278.2.4 src/sys/arch/sparc64/sparc64/machdep.c cvs rdiff -u -r1.103.4.1 -r1.103.4.2 \ src/sys/arch/sparc64/sparc64/netbsd32_machdep.c cvs rdiff -u -r1.4 -r1.4.16.1 src/sys/arch/usermode/target/i386/cpu_i386.c cvs rdiff -u -r1.2 -r1.2.24.1 \ src/sys/arch/usermode/target/x86_64/cpu_x86_64.c cvs rdiff -u -r1.21 -r1.21.28.1 src/sys/arch/vax/vax/sig_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/alpha/alpha/machdep.c diff -u src/sys/arch/alpha/alpha/machdep.c:1.345.2.1 src/sys/arch/alpha/alpha/machdep.c:1.345.2.2 --- src/sys/arch/alpha/alpha/machdep.c:1.345.2.1 Tue Nov 1 20:28:32 2016 +++ src/sys/arch/alpha/alpha/machdep.c Wed Jan 30 13:27:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.345.2.1 2016/11/01 20:28:32 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.345.2.2 2019/01/30 13:27:27 martin Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.2.1 2016/11/01 20:28:32 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.345.2.2 2019/01/30 13:27:27 martin Exp $"); #include #include @@ -1465,12 +1465,11 @@ sendsig_siginfo(const ksiginfo_t *ksi, c #endif /* Build stack frame for signal trampoline. */ - + memset(, 0, sizeof(frame)); frame.sf_si._info = ksi->ksi_info; frame.sf_uc.uc_flags = _UC_SIGMASK; frame.sf_uc.uc_sigmask = *mask; frame.sf_uc.uc_link = l->l_ctxlink; - memset(_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack)); sendsig_reset(l, sig); mutex_exit(p->p_lock); cpu_getmcontext(l, _uc.uc_mcontext, _uc.uc_flags); Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.92.4.1 ---
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Jan 29 08:31:24 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.1.2.36 -r1.1.2.37 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.36 src/doc/CHANGES-7.3:1.1.2.37 --- src/doc/CHANGES-7.3:1.1.2.36 Tue Jan 29 08:10:34 2019 +++ src/doc/CHANGES-7.3 Tue Jan 29 08:31:23 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.36 2019/01/29 08:10:34 msaitoh Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.37 2019/01/29 08:31:23 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -415,6 +415,6 @@ sys/netmpls/mpls_proto.c 1.32 sys/netnatm/natm.cpatch Fix memory leaks pointed out by Ilja Van Sprundel: all - sendoob() functions are expted to free both passed + sendoob() functions are expected to free both passed mbuf chains. [martin, ticket #1676]
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Tue Jan 29 08:10:34 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Remove garbage. To generate a diff of this commit: cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.35 src/doc/CHANGES-7.3:1.1.2.36 --- src/doc/CHANGES-7.3:1.1.2.35 Tue Jan 29 07:57:54 2019 +++ src/doc/CHANGES-7.3 Tue Jan 29 08:10:34 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.35 2019/01/29 07:57:54 msaitoh Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.36 2019/01/29 08:10:34 msaitoh Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -402,7 +402,6 @@ sys/kern/kern_ntptime.c1.60 disclosure. [maxv, ticket #1675] -Pull up following revision(s) (requested by martin in ticket #1676): sys/net/link_proto.c1.37 sys/netatalk/ddp_usrreq.c 1.72 sys/netbt/hci_socket.c1.46
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: msaitoh Date: Tue Jan 29 07:57:54 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: ticket #1676 To generate a diff of this commit: cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.34 src/doc/CHANGES-7.3:1.1.2.35 --- src/doc/CHANGES-7.3:1.1.2.34 Thu Jan 24 14:14:32 2019 +++ src/doc/CHANGES-7.3 Tue Jan 29 07:57:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.34 2019/01/24 14:14:32 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.35 2019/01/29 07:57:54 msaitoh Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -402,3 +402,20 @@ sys/kern/kern_ntptime.c1.60 disclosure. [maxv, ticket #1675] +Pull up following revision(s) (requested by martin in ticket #1676): +sys/net/link_proto.c1.37 +sys/netatalk/ddp_usrreq.c 1.72 +sys/netbt/hci_socket.c1.46 +sys/netbt/l2cap_socket.c 1.36 +sys/netbt/rfcomm_socket.c 1.38 +sys/netbt/sco_socket.c1.38 +sys/netinet/tcp_usrreq.c 1.223 via patch +sys/netinet6/raw_ip6.c1.173 +sys/netinet6/udp6_usrreq.c 1.146 +sys/netmpls/mpls_proto.c 1.32 +sys/netnatm/natm.cpatch + + Fix memory leaks pointed out by Ilja Van Sprundel: all + sendoob() functions are expted to free both passed + mbuf chains. + [martin, ticket #1676]
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: msaitoh Date: Tue Jan 29 07:57:00 UTC 2019 Modified Files: src/sys/net [netbsd-7]: link_proto.c src/sys/netatalk [netbsd-7]: ddp_usrreq.c src/sys/netbt [netbsd-7]: hci_socket.c l2cap_socket.c rfcomm_socket.c sco_socket.c src/sys/netinet [netbsd-7]: tcp_usrreq.c src/sys/netinet6 [netbsd-7]: raw_ip6.c udp6_usrreq.c src/sys/netmpls [netbsd-7]: mpls_proto.c src/sys/netnatm [netbsd-7]: natm.c Log Message: Pull up following revision(s) (requested by martin in ticket #1676): sys/net/link_proto.c1.37 sys/netatalk/ddp_usrreq.c 1.72 sys/netbt/hci_socket.c 1.46 sys/netbt/l2cap_socket.c1.36 sys/netbt/rfcomm_socket.c 1.38 sys/netbt/sco_socket.c 1.38 sys/netinet/tcp_usrreq.c1.223 via patch sys/netinet6/raw_ip6.c 1.173 sys/netinet6/udp6_usrreq.c 1.146 sys/netmpls/mpls_proto.c1.32 sys/netnatm/natm.c patch Fix memory leaks pointed out by Ilja Van Sprundel: all sendoob() functions are expted to free both passed mbuf chains. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/net/link_proto.c cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/netatalk/ddp_usrreq.c cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.31 -r1.31.2.1 src/sys/netbt/l2cap_socket.c cvs rdiff -u -r1.33 -r1.33.2.1 src/sys/netbt/rfcomm_socket.c \ src/sys/netbt/sco_socket.c cvs rdiff -u -r1.200.2.3 -r1.200.2.4 src/sys/netinet/tcp_usrreq.c cvs rdiff -u -r1.136.2.3 -r1.136.2.4 src/sys/netinet6/raw_ip6.c cvs rdiff -u -r1.115 -r1.115.2.1 src/sys/netinet6/udp6_usrreq.c cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/netmpls/mpls_proto.c cvs rdiff -u -r1.45 -r1.45.2.1 src/sys/netnatm/natm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/link_proto.c diff -u src/sys/net/link_proto.c:1.24 src/sys/net/link_proto.c:1.24.2.1 --- src/sys/net/link_proto.c:1.24 Sat Aug 9 05:33:01 2014 +++ src/sys/net/link_proto.c Tue Jan 29 07:56:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: link_proto.c,v 1.24 2014/08/09 05:33:01 rtr Exp $ */ +/* $NetBSD: link_proto.c,v 1.24.2.1 2019/01/29 07:56:59 msaitoh Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.24 2014/08/09 05:33:01 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.24.2.1 2019/01/29 07:56:59 msaitoh Exp $"); #include #include @@ -389,6 +389,9 @@ link_sendoob(struct socket *so, struct m { KASSERT(solocked(so)); + m_freem(m); + m_freem(control); + return EOPNOTSUPP; } Index: src/sys/netatalk/ddp_usrreq.c diff -u src/sys/netatalk/ddp_usrreq.c:1.63 src/sys/netatalk/ddp_usrreq.c:1.63.2.1 --- src/sys/netatalk/ddp_usrreq.c:1.63 Sat Aug 9 05:33:01 2014 +++ src/sys/netatalk/ddp_usrreq.c Tue Jan 29 07:56:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: ddp_usrreq.c,v 1.63 2014/08/09 05:33:01 rtr Exp $ */ +/* $NetBSD: ddp_usrreq.c,v 1.63.2.1 2019/01/29 07:56:59 msaitoh Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.63 2014/08/09 05:33:01 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.63.2.1 2019/01/29 07:56:59 msaitoh Exp $"); #include "opt_mbuftrace.h" @@ -581,8 +581,8 @@ ddp_sendoob(struct socket *so, struct mb { KASSERT(solocked(so)); - if (m) - m_freem(m); + m_freem(m); + m_freem(control); return EOPNOTSUPP; } Index: src/sys/netbt/hci_socket.c diff -u src/sys/netbt/hci_socket.c:1.40 src/sys/netbt/hci_socket.c:1.40.2.1 --- src/sys/netbt/hci_socket.c:1.40 Sat Aug 9 05:33:01 2014 +++ src/sys/netbt/hci_socket.c Tue Jan 29 07:57:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.40 2014/08/09 05:33:01 rtr Exp $ */ +/* $NetBSD: hci_socket.c,v 1.40.2.1 2019/01/29 07:57:00 msaitoh Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.40 2014/08/09 05:33:01 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.40.2.1 2019/01/29 07:57:00 msaitoh Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -712,10 +712,8 @@ hci_sendoob(struct socket *so, struct mb { KASSERT(solocked(so)); - if (m) - m_freem(m); - if (control) - m_freem(control); + m_freem(m); + m_freem(control); return EOPNOTSUPP; } Index: src/sys/netbt/l2cap_socket.c diff -u src/sys/netbt/l2cap_socket.c:1.31 src/sys/netbt/l2cap_socket.c:1.31.2.1 --- src/sys/netbt/l2cap_socket.c:1.31 Sat Aug 9 05:33:01 2014 +++ src/sys/netbt/l2cap_socket.c Tue Jan 29 07:57:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD:
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Jan 24 14:14:32 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1674 and #1675 To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.33 src/doc/CHANGES-7.3:1.1.2.34 --- src/doc/CHANGES-7.3:1.1.2.33 Tue Jan 15 18:43:59 2019 +++ src/doc/CHANGES-7.3 Thu Jan 24 14:14:32 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.33 2019/01/15 18:43:59 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.34 2019/01/24 14:14:32 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -391,3 +391,14 @@ sys/arch/sparc/sparc/pmap.c 1.366 Fix deadlocks on machines with more than two cpus. [mrg, ticket #1672] +regress/sys/arch/m68k/060sp/Makefile 1.15 + + Replace manual realdepend dependency with DPSRCS. + [msaitoh, ticket #1674] + +sys/kern/kern_ntptime.c1.60 + + Zero out the ntptimeval structure to prevent a 4 byte kernel stack + disclosure. + [maxv, ticket #1675] +
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Thu Jan 24 14:14:13 UTC 2019 Modified Files: src/sys/kern [netbsd-7]: kern_ntptime.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1675): sys/kern/kern_ntptime.c: revision 1.60 Zero out the ntptimeval structure to prevent a 4 byte kernel stack disclosure. Reported by Thomas Barabosch. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/kern/kern_ntptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ntptime.c diff -u src/sys/kern/kern_ntptime.c:1.55 src/sys/kern/kern_ntptime.c:1.55.4.1 --- src/sys/kern/kern_ntptime.c:1.55 Tue Feb 25 18:30:11 2014 +++ src/sys/kern/kern_ntptime.c Thu Jan 24 14:14:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ntptime.c,v 1.55 2014/02/25 18:30:11 pooka Exp $ */ +/* $NetBSD: kern_ntptime.c,v 1.55.4.1 2019/01/24 14:14:13 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ #include /* __FBSDID("$FreeBSD: src/sys/kern/kern_ntptime.c,v 1.59 2005/05/28 14:34:41 rwatson Exp $"); */ -__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.55 2014/02/25 18:30:11 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ntptime.c,v 1.55.4.1 2019/01/24 14:14:13 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_ntp.h" @@ -239,6 +239,7 @@ static void hardupdate(long offset); void ntp_gettime(struct ntptimeval *ntv) { + memset(ntv, 0, sizeof(*ntv)); mutex_spin_enter(_lock); nanotime(>time);
CVS commit: [netbsd-7] src/regress/sys/arch/m68k/060sp
Module Name:src Committed By: martin Date: Thu Jan 24 14:08:14 UTC 2019 Modified Files: src/regress/sys/arch/m68k/060sp [netbsd-7]: Makefile Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1674): regress/sys/arch/m68k/060sp/Makefile: revision 1.15 Replace manual realdepend dependency with DPSRCS. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.14.42.1 src/regress/sys/arch/m68k/060sp/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/regress/sys/arch/m68k/060sp/Makefile diff -u src/regress/sys/arch/m68k/060sp/Makefile:1.14 src/regress/sys/arch/m68k/060sp/Makefile:1.14.42.1 --- src/regress/sys/arch/m68k/060sp/Makefile:1.14 Fri Mar 28 22:29:16 2008 +++ src/regress/sys/arch/m68k/060sp/Makefile Thu Jan 24 14:08:14 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.14 2008/03/28 22:29:16 apb Exp $ +# $NetBSD: Makefile,v 1.14.42.1 2019/01/24 14:08:14 martin Exp $ NOMAN= # defined @@ -9,6 +9,7 @@ SRCS= dotest.c dotestsubs.S AFLAGS+= -I. CPPFLAGS+= -I. SPDIR= ${NETBSDSRCDIR}/sys/arch/m68k/060sp +DPSRCS+= itest.S ftest.S CLEANFILES+= itest.S ftest.S .SUFFIXES: .S .sa @@ -19,7 +20,7 @@ CLEANFILES+= itest.S ftest.S .PATH: ${SPDIR}/dist -realdepend dotestsubs.o: itest.S ftest.S +dotestsubs.o: itest.S ftest.S regress: ${PROG} @/sbin/sysctl hw.model | grep -v -q 68060 || \
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Jan 15 18:44:00 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1672 To generate a diff of this commit: cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.32 src/doc/CHANGES-7.3:1.1.2.33 --- src/doc/CHANGES-7.3:1.1.2.32 Fri Jan 11 15:58:54 2019 +++ src/doc/CHANGES-7.3 Tue Jan 15 18:43:59 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.32 2019/01/11 15:58:54 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.33 2019/01/15 18:43:59 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -386,3 +386,8 @@ sys/dev/usb/usbdi.c1.181 upm_close before destroying the interupt pipe xfer. [skrll, ticket #1671] +sys/arch/sparc/sparc/pmap.c 1.366 + + Fix deadlocks on machines with more than two cpus. + [mrg, ticket #1672] +
CVS commit: [netbsd-7] src/sys/arch/sparc/sparc
Module Name:src Committed By: martin Date: Tue Jan 15 18:43:27 UTC 2019 Modified Files: src/sys/arch/sparc/sparc [netbsd-7]: pmap.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1672): sys/arch/sparc/sparc/pmap.c: revision 1.366 switch sparc pmap lock to the scheme sparc64 uses: - - local IPL_NONE mutex for general pmap locking operations, not kernel lock. - - for pmap_activate()/pmap_deactivate(), switch to using the existing ctx_lock, and push handling of it into ctx_alloc() the ctx_free() callers. fixes easy to trigger deadlocks on systems with >2 cpus. without this patch i usually hang during boot. with it, i was able to push the machine hard for over 12 hours. XXX: pullup-8, and maybe -7. To generate a diff of this commit: cvs rdiff -u -r1.358 -r1.358.2.1 src/sys/arch/sparc/sparc/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/sparc/pmap.c diff -u src/sys/arch/sparc/sparc/pmap.c:1.358 src/sys/arch/sparc/sparc/pmap.c:1.358.2.1 --- src/sys/arch/sparc/sparc/pmap.c:1.358 Sat May 3 11:17:06 2014 +++ src/sys/arch/sparc/sparc/pmap.c Tue Jan 15 18:43:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.358 2014/05/03 11:17:06 nakayama Exp $ */ +/* $NetBSD: pmap.c,v 1.358.2.1 2019/01/15 18:43:27 martin Exp $ */ /* * Copyright (c) 1996 @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.358 2014/05/03 11:17:06 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.358.2.1 2019/01/15 18:43:27 martin Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -176,8 +176,8 @@ paddr_t vm_first_phys = (paddr_t)-1; paddr_t vm_last_phys = 0; psize_t vm_num_phys; -#define PMAP_LOCK() KERNEL_LOCK(1, NULL) -#define PMAP_UNLOCK() KERNEL_UNLOCK_ONE(NULL) +#define PMAP_LOCK() mutex_enter(_lock) +#define PMAP_UNLOCK() mutex_exit(_lock) /* * Flags in pvlist.pv_flags. Note that PV_MOD must be 1 and PV_REF must be 2 @@ -347,6 +347,7 @@ mmuq_insert_tail(struct mmuentry *head, int seginval; /* [4/4c] the invalid segment number */ int reginval; /* [4/3mmu] the invalid region number */ +static kmutex_t pmap_lock; static kmutex_t demap_lock; static bool lock_available = false; /* demap_lock has been initialized */ @@ -372,15 +373,15 @@ union ctxinfo { struct pmap *c_pmap; /* pmap (if busy) */ }; -static kmutex_t ctx_lock; /* lock for below */ +static kmutex_t ctx_lock; /* lock for below, and {,de}activate */ union ctxinfo *ctxinfo; /* allocated at in pmap_bootstrap */ union ctxinfo *ctx_freelist; /* context free list */ int ctx_kick; /* allocation rover when none free */ int ctx_kickdir; /* ctx_kick roves both directions */ int ncontext; /* sizeof ctx_freelist */ -void ctx_alloc(struct pmap *); -void ctx_free(struct pmap *); +static void ctx_alloc(struct pmap *); +static void ctx_free(struct pmap *); /*void * vdumppages; -* 32KB worth of reserved dump pages */ @@ -2121,7 +2122,7 @@ mmu_pagein(struct pmap *pm, vaddr_t va, * This routine is only ever called from locore.s just after it has * saved away the previous process, so there are no active user windows. */ -void +static void ctx_alloc(struct pmap *pm) { union ctxinfo *c; @@ -2133,6 +2134,8 @@ ctx_alloc(struct pmap *pm) struct cpu_info *cpi; #endif + KASSERT(mutex_owned(_lock)); + /*XXX-GCC!*/gap_start=gap_end=0; #ifdef DEBUG if (pm->pm_ctx) @@ -2145,7 +2148,6 @@ ctx_alloc(struct pmap *pm) gap_end = pm->pm_gap_end; } - mutex_spin_enter(_lock); if ((c = ctx_freelist) != NULL) { ctx_freelist = c->c_nextfree; cnum = c - ctxinfo; @@ -2288,13 +2290,12 @@ ctx_alloc(struct pmap *pm) setcontext4m(cnum); #endif /* SUN4M || SUN4D */ } - mutex_spin_exit(_lock); } /* * Give away a context. */ -void +static void ctx_free(struct pmap *pm) { union ctxinfo *c; @@ -2303,6 +2304,8 @@ ctx_free(struct pmap *pm) struct cpu_info *cpi; #endif + KASSERT(mutex_owned(_lock)); + c = pm->pm_ctx; ctx = pm->pm_ctxnum; pm->pm_ctx = NULL; @@ -2316,8 +2319,6 @@ ctx_free(struct pmap *pm) } #endif /* SUN4 || SUN4C */ - mutex_spin_enter(_lock); - #if defined(SUN4M) || defined(SUN4D) if (CPU_HAS_SRMMU) { CPU_INFO_ITERATOR i; @@ -2334,7 +2335,6 @@ ctx_free(struct pmap *pm) c->c_nextfree = ctx_freelist; ctx_freelist = c; - mutex_spin_exit(_lock); } @@ -3070,6 +3070,7 @@ pmap_bootstrap(int nctx, int nregion, in } pmap_page_upload(); + mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE); mutex_init(_lock, MUTEX_DEFAULT, IPL_VM); mutex_init(_lock, MUTEX_DEFAULT, IPL_SCHED); lock_available = true; @@ -4386,7 +4387,9 @@ pmap_pmap_pool_dtor(void *arg, void *obj #endif if ((c = pm->pm_ctx) != NULL) { + mutex_spin_enter(_lock); ctx_free(pm); + mutex_spin_exit(_lock); } #if defined(SUN4M) || defined(SUN4D) @@ -4656,7 +4659,7 @@ pmap_remove(struct pmap *pm,
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Jan 11 15:58:54 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1671 To generate a diff of this commit: cvs rdiff -u -r1.1.2.31 -r1.1.2.32 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.31 src/doc/CHANGES-7.3:1.1.2.32 --- src/doc/CHANGES-7.3:1.1.2.31 Mon Jan 7 14:01:02 2019 +++ src/doc/CHANGES-7.3 Fri Jan 11 15:58:54 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.31 2019/01/07 14:01:02 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.32 2019/01/11 15:58:54 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -380,3 +380,9 @@ doc/3RDPARTY (patch) Updated tzdata to 2018i. [kre, ticket #1670] +sys/dev/usb/usbdi.c1.181 + + Avoid use after free when closing interrupt pipe transfer by calling + upm_close before destroying the interupt pipe xfer. + [skrll, ticket #1671] +
CVS commit: [netbsd-7] src/sys/dev/usb
Module Name:src Committed By: martin Date: Fri Jan 11 15:58:23 UTC 2019 Modified Files: src/sys/dev/usb [netbsd-7]: usbdi.c Log Message: Pull up following revision(s) (requested by skrll in ticket #1671): sys/dev/usb/usbdi.c: revision 1.181 Avoid use after free when closing interrupt pipe transfer by calling upm_close before destroying the interupt pipe xfer. Found by kasan on wiz's machine. To generate a diff of this commit: cvs rdiff -u -r1.161.2.3 -r1.161.2.4 src/sys/dev/usb/usbdi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdi.c diff -u src/sys/dev/usb/usbdi.c:1.161.2.3 src/sys/dev/usb/usbdi.c:1.161.2.4 --- src/sys/dev/usb/usbdi.c:1.161.2.3 Sat Aug 25 14:57:35 2018 +++ src/sys/dev/usb/usbdi.c Fri Jan 11 15:58:23 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.161.2.3 2018/08/25 14:57:35 martin Exp $ */ +/* $NetBSD: usbdi.c,v 1.161.2.4 2019/01/11 15:58:23 martin Exp $ */ /* * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.161.2.3 2018/08/25 14:57:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.161.2.4 2019/01/11 15:58:23 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -254,13 +254,14 @@ usbd_close_pipe(struct usbd_pipe *pipe) LIST_REMOVE(pipe, up_next); pipe->up_endpoint->ue_refcnt--; + pipe->up_methods->upm_close(pipe); + if (pipe->up_intrxfer != NULL) { usbd_unlock_pipe(pipe); usbd_destroy_xfer(pipe->up_intrxfer); usbd_lock_pipe(pipe); } - pipe->up_methods->upm_close(pipe); usbd_unlock_pipe(pipe); kmem_free(pipe, pipe->up_dev->ud_bus->ub_pipesize);
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Mon Jan 7 14:01:02 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1670 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.30 src/doc/CHANGES-7.3:1.1.2.31 --- src/doc/CHANGES-7.3:1.1.2.30 Thu Jan 3 11:13:59 2019 +++ src/doc/CHANGES-7.3 Mon Jan 7 14:01:02 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.30 2019/01/03 11:13:59 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.31 2019/01/07 14:01:02 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -360,3 +360,23 @@ sys/conf/copyright1.17 Welcome to 2019! [jnemeth, ticket #1669] +external/public-domain/tz/dist/Makefile up to 1.1.1.23 +external/public-domain/tz/dist/NEWS up to 1.1.1.26 +external/public-domain/tz/dist/TZDATA_VERSION up to 1.16 +external/public-domain/tz/dist/africa up to 1.1.1.19 +external/public-domain/tz/dist/asia up to 1.1.1.22 +external/public-domain/tz/dist/australasia up to 1.1.1.17 +external/public-domain/tz/dist/leapseconds up to 1.1.1.12 +external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.8 +external/public-domain/tz/dist/northamerica up to 1.1.1.22 +external/public-domain/tz/dist/theory.html up to 1.1.1.7 +external/public-domain/tz/dist/version up to 1.1.1.13 +external/public-domain/tz/dist/ziguard.awk up to 1.1.1.4 +external/public-domain/tz/dist/zone.tab up to 1.1.1.16 +external/public-domain/tz/dist/zone1970.tab up to 1.1.1.18 +distrib/sets/lists/base/mi (patch) +doc/3RDPARTY (patch) + + Updated tzdata to 2018i. + [kre, ticket #1670] +
CVS commit: [netbsd-7] src
Module Name:src Committed By: martin Date: Mon Jan 7 14:00:31 UTC 2019 Modified Files: src/distrib/sets/lists/base [netbsd-7]: mi src/doc [netbsd-7]: 3RDPARTY src/external/public-domain/tz/dist [netbsd-7]: Makefile NEWS TZDATA_VERSION africa asia australasia leapseconds leapseconds.awk northamerica theory.html version ziguard.awk zone.tab zone1970.tab Log Message: Pull up the following, requested by kre in ticket #1670: external/public-domain/tz/dist/Makefile up to 1.1.1.23 external/public-domain/tz/dist/NEWS up to 1.1.1.26 external/public-domain/tz/dist/TZDATA_VERSION up to 1.16 external/public-domain/tz/dist/africa up to 1.1.1.19 external/public-domain/tz/dist/asia up to 1.1.1.22 external/public-domain/tz/dist/australasia up to 1.1.1.17 external/public-domain/tz/dist/leapseconds up to 1.1.1.12 external/public-domain/tz/dist/leapseconds.awk up to 1.1.1.8 external/public-domain/tz/dist/northamerica up to 1.1.1.22 external/public-domain/tz/dist/theory.html up to 1.1.1.7 external/public-domain/tz/dist/version up to 1.1.1.13 external/public-domain/tz/dist/ziguard.awk up to 1.1.1.4 external/public-domain/tz/dist/zone.tab up to 1.1.1.16 external/public-domain/tz/dist/zone1970.tab up to 1.1.1.18 distrib/sets/lists/base/mi (patch) doc/3RDPARTY(patch) Import tzdata2018h from ftp://ftp.iana.org/tz/releases/tzdata2018h.tar.gz Summary of changes in tzdata2018h (2018-12-23 17:59:32 -0800): Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to +05 on 2018-12-21. This is a zone split as Qostanay (aka Kostanay) did not switch, so create a zone Asia/Qostanay. Metlakatla, Alaska observes PST this winter only. Add predictions for Iran from 2038 through 2090. Changes to some old timestamps for Nauru (1979) Guam (1959-77), Hong Kong (1904, 1941, 1945, 1952) (others in Pacific during WWII) --- Merge tzdata2018h --- Update to tzdata2018h (new zone Asia/Qostanay) --- Import tzdata2018i from ftp://ftp.iana.org/tz/releases/tzdata2018i.tar.gz Summary of changes in tzdata2018i (2018-12-30 11:05:43 -0800): Due to a change in government, Sao Tome and Principe switches back from +01 to +00 on 2019-01-01 at 02:00. --- Merge tzdata2018i --- Update to tzdata2018i To generate a diff of this commit: cvs rdiff -u -r1.1087.2.14 -r1.1087.2.15 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.1145.2.52 -r1.1145.2.53 src/doc/3RDPARTY cvs rdiff -u -r1.1.1.1.4.11 -r1.1.1.1.4.12 \ src/external/public-domain/tz/dist/Makefile \ src/external/public-domain/tz/dist/asia \ src/external/public-domain/tz/dist/northamerica cvs rdiff -u -r1.1.1.1.4.12 -r1.1.1.1.4.13 \ src/external/public-domain/tz/dist/NEWS cvs rdiff -u -r1.6.4.8 -r1.6.4.9 \ src/external/public-domain/tz/dist/TZDATA_VERSION cvs rdiff -u -r1.1.1.1.4.10 -r1.1.1.1.4.11 \ src/external/public-domain/tz/dist/africa \ src/external/public-domain/tz/dist/australasia \ src/external/public-domain/tz/dist/leapseconds \ src/external/public-domain/tz/dist/zone.tab \ src/external/public-domain/tz/dist/zone1970.tab cvs rdiff -u -r1.1.1.1.4.6 -r1.1.1.1.4.7 \ src/external/public-domain/tz/dist/leapseconds.awk cvs rdiff -u -r1.1.1.1.4.5 -r1.1.1.1.4.6 \ src/external/public-domain/tz/dist/theory.html cvs rdiff -u -r1.1.1.3.4.8 -r1.1.1.3.4.9 \ src/external/public-domain/tz/dist/version cvs rdiff -u -r1.1.1.1.4.4 -r1.1.1.1.4.5 \ src/external/public-domain/tz/dist/ziguard.awk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1087.2.14 src/distrib/sets/lists/base/mi:1.1087.2.15 --- src/distrib/sets/lists/base/mi:1.1087.2.14 Sun Jul 29 06:44:19 2018 +++ src/distrib/sets/lists/base/mi Mon Jan 7 14:00:31 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1087.2.14 2018/07/29 06:44:19 martin Exp $ +# $NetBSD: mi,v 1.1087.2.15 2019/01/07 14:00:31 martin Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -5489,6 +5489,7 @@ ./usr/share/zoneinfo/Asia/Pontianak base-sys-share share ./usr/share/zoneinfo/Asia/Pyongyang base-sys-share share ./usr/share/zoneinfo/Asia/Qatar base-sys-share share +./usr/share/zoneinfo/Asia/Qostanay base-sys-share share ./usr/share/zoneinfo/Asia/Qyzylorda base-sys-share share ./usr/share/zoneinfo/Asia/Rangoon base-sys-share share ./usr/share/zoneinfo/Asia/Riyadh base-sys-share share Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1145.2.52 src/doc/3RDPARTY:1.1145.2.53 ---
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Jan 3 11:13:59 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ammend ticket #1668 for additional pullups To generate a diff of this commit: cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.29 src/doc/CHANGES-7.3:1.1.2.30 --- src/doc/CHANGES-7.3:1.1.2.29 Wed Jan 2 15:32:26 2019 +++ src/doc/CHANGES-7.3 Thu Jan 3 11:13:59 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.29 2019/01/02 15:32:26 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.30 2019/01/03 11:13:59 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -350,6 +350,7 @@ sys/kern/kern_time.c1.191 sys/compat/netbsd32/netbsd32_compat_14.c 1.27 sys/compat/netbsd32/netbsd32_conv.h 1.37 sys/compat/sys/msg.h1.5 +sys/compat/sys/time_types.h 1.3 Fix kernel info leaks. [maxv, ticket #1668]
CVS commit: [netbsd-7] src/sys/compat/sys
Module Name:src Committed By: martin Date: Thu Jan 3 11:13:19 UTC 2019 Modified Files: src/sys/compat/sys [netbsd-7]: time_types.h Log Message: Additionally pull up the following for ticket #1668: sys/compat/sys/time_types.h 1.3 include libkern.h or string.h & stddef.h, to get the offsetof() and memset() definitions. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.40.1 src/sys/compat/sys/time_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/time_types.h diff -u src/sys/compat/sys/time_types.h:1.1 src/sys/compat/sys/time_types.h:1.1.40.1 --- src/sys/compat/sys/time_types.h:1.1 Thu Nov 5 16:59:01 2009 +++ src/sys/compat/sys/time_types.h Thu Jan 3 11:13:19 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: time_types.h,v 1.1 2009/11/05 16:59:01 pooka Exp $ */ +/* $NetBSD: time_types.h,v 1.1.40.1 2019/01/03 11:13:19 martin Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -34,6 +34,13 @@ #ifndef _COMPAT_SYS_TIME_TYPES_H_ #define _COMPAT_SYS_TIME_TYPES_H_ +#ifdef _KERNEL +#include +#else +#include +#include +#endif + /* * Structure returned by gettimeofday(2) system call, * and used in other calls.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Jan 2 15:32:26 UTC 2019 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Tickets #1668 and #1669 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.28 src/doc/CHANGES-7.3:1.1.2.29 --- src/doc/CHANGES-7.3:1.1.2.28 Thu Dec 27 12:00:42 2018 +++ src/doc/CHANGES-7.3 Wed Jan 2 15:32:26 2019 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.28 2018/12/27 12:00:42 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.29 2019/01/02 15:32:26 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -347,3 +347,15 @@ sys/kern/kern_time.c1.191 Fix kernel info leak. [maxv, ticket #1667] +sys/compat/netbsd32/netbsd32_compat_14.c 1.27 +sys/compat/netbsd32/netbsd32_conv.h 1.37 +sys/compat/sys/msg.h1.5 + + Fix kernel info leaks. + [maxv, ticket #1668] + +sys/conf/copyright1.17 + + Welcome to 2019! + [jnemeth, ticket #1669] +
CVS commit: [netbsd-7] src/sys/conf
Module Name:src Committed By: martin Date: Wed Jan 2 15:31:46 UTC 2019 Modified Files: src/sys/conf [netbsd-7]: copyright Log Message: Pull up following revision(s) (requested by jnemeth in ticket #1669): sys/conf/copyright: revision 1.17 Welcome to 2019! To generate a diff of this commit: cvs rdiff -u -r1.12.4.3 -r1.12.4.4 src/sys/conf/copyright Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/copyright diff -u src/sys/conf/copyright:1.12.4.3 src/sys/conf/copyright:1.12.4.4 --- src/sys/conf/copyright:1.12.4.3 Fri Mar 9 19:50:16 2018 +++ src/sys/conf/copyright Wed Jan 2 15:31:46 2019 @@ -1,5 +1,5 @@ Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, -2018 The NetBSD Foundation, Inc. All rights reserved. +2018, 2019 The NetBSD Foundation, Inc. All rights reserved. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved.
CVS commit: [netbsd-7] src/sys/compat
Module Name:src Committed By: martin Date: Wed Jan 2 15:25:29 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_14.c netbsd32_conv.h src/sys/compat/sys [netbsd-7]: msg.h Log Message: Pull up following revision(s) (requested by maxv in ticket #1668): sys/compat/netbsd32/netbsd32_conv.h: revision 1.37 sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.27 sys/compat/sys/msg.h: revision 1.5 Fix kernel info leaks. + Possible info leak: [len=80, leaked=10] | #0 0x80bad7a7 in kleak_copyout | #1 0x8048e71b in netbsd32___msgctl50 | #2 0x8022fb5b in netbsd32_syscall | #3 0x802096dd in handle_syscall To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.21.74.1 src/sys/compat/netbsd32/netbsd32_compat_14.c cvs rdiff -u -r1.28.4.1 -r1.28.4.2 src/sys/compat/netbsd32/netbsd32_conv.h cvs rdiff -u -r1.4 -r1.4.40.1 src/sys/compat/sys/msg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_compat_14.c diff -u src/sys/compat/netbsd32/netbsd32_compat_14.c:1.21 src/sys/compat/netbsd32/netbsd32_compat_14.c:1.21.74.1 --- src/sys/compat/netbsd32/netbsd32_compat_14.c:1.21 Thu Dec 20 23:03:01 2007 +++ src/sys/compat/netbsd32/netbsd32_compat_14.c Wed Jan 2 15:25:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_14.c,v 1.21 2007/12/20 23:03:01 dsl Exp $ */ +/* $NetBSD: netbsd32_compat_14.c,v 1.21.74.1 2019/01/02 15:25:29 martin Exp $ */ /* * Copyright (c) 1999 Eduardo E. Horvath @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.21 2007/12/20 23:03:01 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_14.c,v 1.21.74.1 2019/01/02 15:25:29 martin Exp $"); #include #include @@ -126,6 +126,7 @@ static inline void native_to_netbsd32_msqid_ds14(struct msqid_ds *msqbuf, struct netbsd32_msqid_ds14 *omsqbuf) { + memset(omsqbuf, 0, sizeof(*omsqbuf)); native_to_netbsd32_ipc_perm14(>msg_perm, >msg_perm); #define CVT(x) omsqbuf->x = msqbuf->x Index: src/sys/compat/netbsd32/netbsd32_conv.h diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.28.4.1 src/sys/compat/netbsd32/netbsd32_conv.h:1.28.4.2 --- src/sys/compat/netbsd32/netbsd32_conv.h:1.28.4.1 Wed Nov 4 17:46:21 2015 +++ src/sys/compat/netbsd32/netbsd32_conv.h Wed Jan 2 15:25:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_conv.h,v 1.28.4.1 2015/11/04 17:46:21 riz Exp $ */ +/* $NetBSD: netbsd32_conv.h,v 1.28.4.2 2019/01/02 15:25:29 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -544,6 +544,7 @@ netbsd32_from_msqid_ds50(const struct ms struct netbsd32_msqid_ds50 *ds32p) { + memset(ds32p, 0, sizeof(*ds32p)); netbsd32_from_ipc_perm(>msg_perm, >msg_perm); ds32p->_msg_cbytes = (netbsd32_u_long)dsp->_msg_cbytes; ds32p->msg_qnum = (netbsd32_u_long)dsp->msg_qnum; @@ -560,6 +561,7 @@ netbsd32_from_msqid_ds(const struct msqi struct netbsd32_msqid_ds *ds32p) { + memset(ds32p, 0, sizeof(*ds32p)); netbsd32_from_ipc_perm(>msg_perm, >msg_perm); ds32p->_msg_cbytes = (netbsd32_u_long)dsp->_msg_cbytes; ds32p->msg_qnum = (netbsd32_u_long)dsp->msg_qnum; Index: src/sys/compat/sys/msg.h diff -u src/sys/compat/sys/msg.h:1.4 src/sys/compat/sys/msg.h:1.4.40.1 --- src/sys/compat/sys/msg.h:1.4 Mon Jan 19 19:39:41 2009 +++ src/sys/compat/sys/msg.h Wed Jan 2 15:25:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.h,v 1.4 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: msg.h,v 1.4.40.1 2019/01/02 15:25:29 martin Exp $ */ /* * SVID compatible msg.h file @@ -108,6 +108,7 @@ static __inline void __native_to_msqid_ds13(const struct msqid_ds *msqbuf, struct msqid_ds13 *omsqbuf) { + memset(omsqbuf, 0, sizeof(*omsqbuf)); omsqbuf->msg_perm = msqbuf->msg_perm; #define CVT(x) omsqbuf->x = msqbuf->x @@ -149,6 +150,7 @@ static __inline void __native_to_msqid_ds14(const struct msqid_ds *msqbuf, struct msqid_ds14 *omsqbuf) { + memset(omsqbuf, 0, sizeof(*omsqbuf)); __native_to_ipc_perm14(>msg_perm, >msg_perm); #define CVT(x) omsqbuf->x = msqbuf->x
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Thu Dec 27 12:00:43 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1667 To generate a diff of this commit: cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.27 src/doc/CHANGES-7.3:1.1.2.28 --- src/doc/CHANGES-7.3:1.1.2.27 Tue Dec 25 11:33:02 2018 +++ src/doc/CHANGES-7.3 Thu Dec 27 12:00:42 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.27 2018/12/25 11:33:02 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.28 2018/12/27 12:00:42 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -342,3 +342,8 @@ sys/compat/netbsd32/netbsd32_netbsd.c ( Fix kernel info leak in swapctl(2). [maxv, ticket #1666] +sys/kern/kern_time.c1.191 + + Fix kernel info leak. + [maxv, ticket #1667] +
CVS commit: [netbsd-7] src/sys/kern
Module Name:src Committed By: martin Date: Thu Dec 27 12:00:10 UTC 2018 Modified Files: src/sys/kern [netbsd-7]: kern_time.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1667): sys/kern/kern_time.c: revision 1.191 Fix kernel info leak. There are 2x4 bytes of padding in struct itimerval. [ 738.451860] kleak: Possible leak in copyout: [len=32, leaked=8] [ 738.481840] #0 0x80b7c42a in kleak_note [ 738.491821] #1 0x80b7c4aa in kleak_copyout [ 738.501806] #2 0x80b6154e in sys___getitimer50 [ 738.511778] #3 0x80b61e39 in sys___setitimer50 [ 738.521781] #4 0x8025ab3c in sy_call [ 738.521781] #5 0x8025ad6e in sy_invoke [ 738.531808] #6 0x8025adf4 in syscall To generate a diff of this commit: cvs rdiff -u -r1.179.8.3 -r1.179.8.4 src/sys/kern/kern_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_time.c diff -u src/sys/kern/kern_time.c:1.179.8.3 src/sys/kern/kern_time.c:1.179.8.4 --- src/sys/kern/kern_time.c:1.179.8.3 Fri Dec 14 12:04:26 2018 +++ src/sys/kern/kern_time.c Thu Dec 27 12:00:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time.c,v 1.179.8.3 2018/12/14 12:04:26 martin Exp $ */ +/* $NetBSD: kern_time.c,v 1.179.8.4 2018/12/27 12:00:10 martin Exp $ */ /*- * Copyright (c) 2000, 2004, 2005, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.3 2018/12/14 12:04:26 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time.c,v 1.179.8.4 2018/12/27 12:00:10 martin Exp $"); #include #include @@ -1030,6 +1030,7 @@ sys___getitimer50(struct lwp *l, const s struct itimerval aitv; int error; + memset(, 0, sizeof(aitv)); error = dogetitimer(p, SCARG(uap, which), ); if (error) return error;
CVS commit: [netbsd-7] src/sys
Module Name:src Committed By: martin Date: Tue Dec 25 11:32:30 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_netbsd.c src/sys/uvm [netbsd-7]: uvm_swap.c Log Message: Apply patch, requested by maxv in ticket #1666: Fix similar to: sys/uvm/uvm_swap.c: revision 1.178 Woah man, fix enormous leak. Possible info leak: [len=1056, leaked=931] #0 0x80bad351 in kleak_copyout #1 0x80b2cf64 in uvm_swap_stats.part.1 #2 0x80b2d38d in uvm_swap_stats #3 0x80b2d43c in sys_swapctl #4 0x80259b82 in syscall To generate a diff of this commit: cvs rdiff -u -r1.193 -r1.193.2.1 src/sys/compat/netbsd32/netbsd32_netbsd.c cvs rdiff -u -r1.172 -r1.172.2.1 src/sys/uvm/uvm_swap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_netbsd.c diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.193 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.193.2.1 --- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.193 Thu Jul 31 12:35:33 2014 +++ src/sys/compat/netbsd32/netbsd32_netbsd.c Tue Dec 25 11:32:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.193 2014/07/31 12:35:33 maxv Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.193.2.1 2018/12/25 11:32:30 martin Exp $ */ /* * Copyright (c) 1998, 2001, 2008 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.193 2014/07/31 12:35:33 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.193.2.1 2018/12/25 11:32:30 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -1754,7 +1754,7 @@ netbsd32_swapctl_stats(struct lwp *l, st count = uvmexp.nswapdev; ksep_len = sizeof(*ksep) * count; - ksep = kmem_alloc(ksep_len, KM_SLEEP); + ksep = kmem_zalloc(ksep_len, KM_SLEEP); usep32 = (struct netbsd32_swapent *)SCARG(uap, arg); uvm_swap_stats(SWAP_STATS, ksep, count, retval); Index: src/sys/uvm/uvm_swap.c diff -u src/sys/uvm/uvm_swap.c:1.172 src/sys/uvm/uvm_swap.c:1.172.2.1 --- src/sys/uvm/uvm_swap.c:1.172 Fri Jul 25 08:10:40 2014 +++ src/sys/uvm/uvm_swap.c Tue Dec 25 11:32:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.c,v 1.172 2014/07/25 08:10:40 dholland Exp $ */ +/* $NetBSD: uvm_swap.c,v 1.172.2.1 2018/12/25 11:32:30 martin Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.172 2014/07/25 08:10:40 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.172.2.1 2018/12/25 11:32:30 martin Exp $"); #include "opt_uvmhist.h" #include "opt_compat_netbsd.h" @@ -515,7 +515,7 @@ sys_swapctl(struct lwp *l, const struct else #endif len = sizeof(struct swapent) * misc; - sep = (struct swapent *)kmem_alloc(len, KM_SLEEP); + sep = (struct swapent *)kmem_zalloc(len, KM_SLEEP); uvm_swap_stats(SCARG(uap, cmd), sep, misc, retval); error = copyout(sep, SCARG(uap, arg), len);
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Tue Dec 25 11:33:02 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.3 Log Message: Ticket #1666 To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-7.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.3 diff -u src/doc/CHANGES-7.3:1.1.2.26 src/doc/CHANGES-7.3:1.1.2.27 --- src/doc/CHANGES-7.3:1.1.2.26 Tue Dec 18 18:35:26 2018 +++ src/doc/CHANGES-7.3 Tue Dec 25 11:33:02 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.3,v 1.1.2.26 2018/12/18 18:35:26 martin Exp $ +# $NetBSD: CHANGES-7.3,v 1.1.2.27 2018/12/25 11:33:02 martin Exp $ A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3 release: @@ -336,3 +336,9 @@ usr.bin/telnet/utilities.c 1.24 Switch some sprintf to snprintf. [maya, ticket #1665] +sys/uvm/uvm_swap.c1.178 (patch, adapted) +sys/compat/netbsd32/netbsd32_netbsd.c (patch) + + Fix kernel info leak in swapctl(2). + [maxv, ticket #1666] +
CVS commit: [netbsd-7] src/usr.bin/telnet
Module Name:src Committed By: martin Date: Tue Dec 18 18:36:10 UTC 2018 Modified Files: src/usr.bin/telnet [netbsd-7]: telnet.c utilities.c Log Message: Pull up following revision(s) (requested by maya in ticket #1665): usr.bin/telnet/utilities.c: revision 1.24 usr.bin/telnet/telnet.c: revision 1.37 switch sprintf to snprintf in places. Reported by hacker fantastic, thanks! ok xtos. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.36.18.1 src/usr.bin/telnet/telnet.c cvs rdiff -u -r1.23 -r1.23.18.1 src/usr.bin/telnet/utilities.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/telnet/telnet.c diff -u src/usr.bin/telnet/telnet.c:1.36 src/usr.bin/telnet/telnet.c:1.36.18.1 --- src/usr.bin/telnet/telnet.c:1.36 Tue Jan 10 13:49:32 2012 +++ src/usr.bin/telnet/telnet.c Tue Dec 18 18:36:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: telnet.c,v 1.36 2012/01/10 13:49:32 christos Exp $ */ +/* $NetBSD: telnet.c,v 1.36.18.1 2018/12/18 18:36:10 martin Exp $ */ /* * Copyright (c) 1988, 1990, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)telnet.c 8.4 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: telnet.c,v 1.36 2012/01/10 13:49:32 christos Exp $"); +__RCSID("$NetBSD: telnet.c,v 1.36.18.1 2018/12/18 18:36:10 martin Exp $"); #endif #endif /* not lint */ @@ -856,8 +856,8 @@ suboption(void) name = gettermname(); len = strlen(name) + 4 + 2; if (len < NETROOM()) { - sprintf((char *)temp, "%c%c%c%c%s%c%c", IAC, SB, TELOPT_TTYPE, -TELQUAL_IS, name, IAC, SE); + snprintf((char *)temp, sizeof(temp), "%c%c%c%c%s%c%c", IAC, SB, +TELOPT_TTYPE, TELQUAL_IS, name, IAC, SE); ring_supply_data(, temp, len); printsub('>', [2], len-2); } else { @@ -878,8 +878,8 @@ suboption(void) TerminalSpeeds(, ); - sprintf((char *)temp, "%c%c%c%c%ld,%ld%c%c", IAC, SB, TELOPT_TSPEED, - TELQUAL_IS, osp, isp, IAC, SE); + snprintf((char *)temp, sizeof(temp), "%c%c%c%c%ld,%ld%c%c", IAC, SB, + TELOPT_TSPEED, TELQUAL_IS, osp, isp, IAC, SE); len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ if (len < NETROOM()) { @@ -983,8 +983,8 @@ suboption(void) send_wont(TELOPT_XDISPLOC, 1); break; } - sprintf((char *)temp, "%c%c%c%c%s%c%c", IAC, SB, TELOPT_XDISPLOC, - TELQUAL_IS, dp, IAC, SE); + snprintf((char *)temp, sizeof(temp), "%c%c%c%c%s%c%c", IAC, SB, + TELOPT_XDISPLOC, TELQUAL_IS, dp, IAC, SE); len = strlen((char *)temp+4) + 4; /* temp[3] is 0 ... */ if (len < NETROOM()) { Index: src/usr.bin/telnet/utilities.c diff -u src/usr.bin/telnet/utilities.c:1.23 src/usr.bin/telnet/utilities.c:1.23.18.1 --- src/usr.bin/telnet/utilities.c:1.23 Mon Jan 9 16:08:55 2012 +++ src/usr.bin/telnet/utilities.c Tue Dec 18 18:36:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: utilities.c,v 1.23 2012/01/09 16:08:55 christos Exp $ */ +/* $NetBSD: utilities.c,v 1.23.18.1 2018/12/18 18:36:10 martin Exp $ */ /* * Copyright (c) 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)utilities.c 8.3 (Berkeley) 5/30/95"; #else -__RCSID("$NetBSD: utilities.c,v 1.23 2012/01/09 16:08:55 christos Exp $"); +__RCSID("$NetBSD: utilities.c,v 1.23.18.1 2018/12/18 18:36:10 martin Exp $"); #endif #endif /* not lint */ @@ -633,7 +633,7 @@ printsub( } { char tbuf[64]; - sprintf(tbuf, "%s%s%s%s%s", + snprintf(tbuf, sizeof(tbuf), "%s%s%s%s%s", pointer[2]_EDIT ? "|EDIT" : "", pointer[2]_TRAPSIG ? "|TRAPSIG" : "", pointer[2]_SOFT_TAB ? "|SOFT_TAB" : "",