Re: enhanced use-after-free detection for malloc v2

2015-10-30 Thread Daniel Micay
On 26/10/15 04:19 PM, Daniel Micay wrote: > This is an improved revision of my earlier patch. > > It now validates the junk data in the delayed_chunks array in an atexit > handler > too, rather than just when allocations are swapped out. > > It will now catch this simple UAF 100% of the time: >

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Sebastian Benoit
Reyk Floeter(r...@openbsd.org) on 2015.10.30 19:25:28 +0100: > On Fri, Oct 30, 2015 at 06:16:53PM +0100, Sebastian Benoit wrote: > > > > i think it should be documented ;) > > > > otherwise ok > > > > Ooops, good point, I missed the manpage. > > It looks about right, but maybe it is better to

By four CRC32

2015-10-30 Thread Karel Gardas
Hello, I'm curious what's need to be done in order to have by-four version of CRC32 enabled by default let's say at least on amd64? Attached patch is quite aggressive as I put an option into generic GENERIC, but still I hope it may be usable as a starting point. Performance of CRC32 went up from 3

Re: toy zones for openbsd - an undergrad operating systems course assignment

2015-10-30 Thread Kristaps Dzonsons
> however, i found it interesting to get my head around this aspect > of the system, and i figured other people (such as this years > comp3301 students) would be interested too. i also felt sad i couldnt > find kritaps mult code anywhere, so i wanted this to be backed up > by everyone for future po

Re: Stop using rt_ifp in nd6*

2015-10-30 Thread Alexander Bluhm
On Thu, Oct 29, 2015 at 03:54:29PM +0100, Martin Pieuchot wrote: > When we already had a valid ``ifp'' I used it. Since defrouter_lookup() > is only doing a comparison, let's use interface indexes. > > ok? OK bluhm@ > Index: netinet6/nd6.c > =

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 07:05:09PM +0100, Alexander Bluhm wrote: > On Fri, Oct 30, 2015 at 06:48:16PM +0100, Mike Belopuhov wrote: > > On Fri, Oct 30, 2015 at 18:27 +0100, Alexander Bluhm wrote: > > > On Fri, Oct 30, 2015 at 02:04:52PM +0100, Reyk Floeter wrote: > > > > > Socket splicing somove() d

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Alexander Bluhm
On Fri, Oct 30, 2015 at 06:48:16PM +0100, Mike Belopuhov wrote: > On Fri, Oct 30, 2015 at 18:27 +0100, Alexander Bluhm wrote: > > On Fri, Oct 30, 2015 at 02:04:52PM +0100, Reyk Floeter wrote: > > > > Socket splicing somove() does the same thing. I will change it to > > > > use m_resethdr() after t

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 06:16:53PM +0100, Sebastian Benoit wrote: > > i think it should be documented ;) > > otherwise ok > Ooops, good point, I missed the manpage. It looks about right, but maybe it is better to have it less pf- specific (also regarding bluhm's update)? Otherwise OK Reyk >

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 19:05 +0100, Alexander Bluhm wrote: > On Fri, Oct 30, 2015 at 06:48:16PM +0100, Mike Belopuhov wrote: > > On Fri, Oct 30, 2015 at 18:27 +0100, Alexander Bluhm wrote: > > > On Fri, Oct 30, 2015 at 02:04:52PM +0100, Reyk Floeter wrote: > > > > > Socket splicing somove() does t

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 18:27 +0100, Alexander Bluhm wrote: > On Fri, Oct 30, 2015 at 02:04:52PM +0100, Reyk Floeter wrote: > > > Socket splicing somove() does the same thing. I will change it to > > > use m_resethdr() after that got commited. > > I just compared code in somove() with m_resethdr(

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Alexander Bluhm
On Fri, Oct 30, 2015 at 02:04:52PM +0100, Reyk Floeter wrote: > > Socket splicing somove() does the same thing. I will change it to > > use m_resethdr() after that got commited. I just compared code in somove() with m_resethdr(). Socket splicing has to clear the whole packet header, not only the

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 18:16 +0100, Sebastian Benoit wrote: > > i think it should be documented ;) > > otherwise ok > > Index: mbuf.9 > === > RCS file: /cvs/src/share/man/man9/mbuf.9,v > retrieving revision 1.91 > diff -u -p -u -r1

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Sebastian Benoit
i think it should be documented ;) otherwise ok Index: mbuf.9 === RCS file: /cvs/src/share/man/man9/mbuf.9,v retrieving revision 1.91 diff -u -p -u -r1.91 mbuf.9 --- mbuf.9 8 Oct 2015 14:09:34 - 1.91 +++ mbuf.9 3

login(3) routines data integrity patch

2015-10-30 Thread Chris Turner
Hello - I was testing some login data collection scripts (on a VM) and discovered that in certain cases, it was possible for a login record to not be fully commited to disk prior to system shutdown, resulting in the last(1) entry for the login not being visible. (was doing e.g. ssh root@testbox

Re: boot from softraid, backspace in passphrase prompt

2015-10-30 Thread Miod Vallat
> I want correct typing mistakes when booting from softraid crypto disks. > Can we handle at least the backspace key, plz^Hease? :) This calls for a libsa gets() replacement, which will honour bounds. What about the plumbing diff below, so that softraid-capable bootblocks can use the new getln() r

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-10-30 Thread Nicholas Marriott
Sorry, the one I pointed out in ci.c is wrong: > rcs_close(pb.file); > - if (rev_str != NULL) > - rcsnum_free(pb.newrev); > + rcsnum_free(pb.newrev); > pb.newrev = NULL; pb.newrev can be changed by checkin_init or checkin_upd

Re: rt_ifix for ip6_forward()

2015-10-30 Thread Alexander Bluhm
On Thu, Oct 29, 2015 at 03:51:57PM +0100, Martin Pieuchot wrote: > Stop using rt_ifp in this function. > > ok? OK bluhm@ > > Index: netinet6/ip6_forward.c > === > RCS file: /cvs/src/sys/netinet6/ip6_forward.c,v > retrieving revisio

ntpd(8): remove SIGINFO reports, we have ntpctl now

2015-10-30 Thread Reyk Floeter
Hi, is anybody still using SIGINFO to get reports from ntpd? It predates ntpctl that is a sufficient replacement. OK? Reyk Index: ntp.c === RCS file: /cvs/src/usr.sbin/ntpd/ntp.c,v retrieving revision 1.138 diff -u -p -u -p -r1.138

Re: toy zones for openbsd - an undergrad operating systems course assignment

2015-10-30 Thread Karel Gardas
On Fri, Oct 30, 2015 at 1:11 PM, David Gwynne wrote: > >> On 30 Oct 2015, at 9:13 PM, Karel Gardas wrote: >> >> This is nice! Am I right assuming zone exec is a short-cut for not >> need to implement Solaris' zlogin functionality? I'm not sure if I'm >> as ordinary global zone user on Solaris abl

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 01:40:19PM +0100, Alexander Bluhm wrote: > On Fri, Oct 30, 2015 at 12:56:34PM +0100, Reyk Floeter wrote: > > --- sys/sys/mbuf.h 22 Oct 2015 05:26:06 - 1.198 > > +++ sys/sys/mbuf.h 30 Oct 2015 11:30:33 - > > @@ -410,6 +410,7 @@ struct mbuf *m_get(int, int); >

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Alexander Bluhm
On Fri, Oct 30, 2015 at 12:56:34PM +0100, Reyk Floeter wrote: > --- sys/sys/mbuf.h22 Oct 2015 05:26:06 - 1.198 > +++ sys/sys/mbuf.h30 Oct 2015 11:30:33 - > @@ -410,6 +410,7 @@ structmbuf *m_get(int, int); > struct mbuf *m_getclr(int, int); > struct mbuf *m_get

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 13:25 +0100, Reyk Floeter wrote: > On Fri, Oct 30, 2015 at 12:45:31PM +0100, Mike Belopuhov wrote: > > On Fri, Oct 30, 2015 at 12:56 +0100, Reyk Floeter wrote: > > > On Fri, Oct 30, 2015 at 12:29:27PM +0100, Mike Belopuhov wrote: > > > > On Fri, Oct 30, 2015 at 12:29 +0100,

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 12:45:31PM +0100, Mike Belopuhov wrote: > On Fri, Oct 30, 2015 at 12:56 +0100, Reyk Floeter wrote: > > On Fri, Oct 30, 2015 at 12:29:27PM +0100, Mike Belopuhov wrote: > > > On Fri, Oct 30, 2015 at 12:29 +0100, Mike Belopuhov wrote: > > > > On Fri, Oct 30, 2015 at 12:19 +0100

Re: toy zones for openbsd - an undergrad operating systems course assignment

2015-10-30 Thread David Gwynne
> On 30 Oct 2015, at 9:13 PM, Karel Gardas wrote: > > This is nice! Am I right assuming zone exec is a short-cut for not > need to implement Solaris' zlogin functionality? I'm not sure if I'm > as ordinary global zone user on Solaris able to start process in > another zone where I don't have log

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 12:56 +0100, Reyk Floeter wrote: > On Fri, Oct 30, 2015 at 12:29:27PM +0100, Mike Belopuhov wrote: > > On Fri, Oct 30, 2015 at 12:29 +0100, Mike Belopuhov wrote: > > > On Fri, Oct 30, 2015 at 12:19 +0100, Reyk Floeter wrote: > > > > On Fri, Oct 30, 2015 at 11:30:56AM +0100,

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 12:29:27PM +0100, Mike Belopuhov wrote: > On Fri, Oct 30, 2015 at 12:29 +0100, Mike Belopuhov wrote: > > On Fri, Oct 30, 2015 at 12:19 +0100, Reyk Floeter wrote: > > > On Fri, Oct 30, 2015 at 11:30:56AM +0100, Alexander Bluhm wrote: > > > > On Fri, Oct 30, 2015 at 10:43:21AM

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 12:29 +0100, Mike Belopuhov wrote: > On Fri, Oct 30, 2015 at 12:19 +0100, Reyk Floeter wrote: > > On Fri, Oct 30, 2015 at 11:30:56AM +0100, Alexander Bluhm wrote: > > > On Fri, Oct 30, 2015 at 10:43:21AM +0100, Reyk Floeter wrote: > > > > Question: > > > > > How does pair(4)

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Mike Belopuhov
On Fri, Oct 30, 2015 at 12:19 +0100, Reyk Floeter wrote: > On Fri, Oct 30, 2015 at 11:30:56AM +0100, Alexander Bluhm wrote: > > On Fri, Oct 30, 2015 at 10:43:21AM +0100, Reyk Floeter wrote: > > > Question: > > > > How does pair(4) interact with pf? If a packet crosses a pair > > > > does it create

Re: toy zones for openbsd - an undergrad operating systems course assignment

2015-10-30 Thread Karel Gardas
This is nice! Am I right assuming zone exec is a short-cut for not need to implement Solaris' zlogin functionality? I'm not sure if I'm as ordinary global zone user on Solaris able to start process in another zone where I don't have login credentials. So that may be difference between your zone and

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 11:30:56AM +0100, Alexander Bluhm wrote: > On Fri, Oct 30, 2015 at 10:43:21AM +0100, Reyk Floeter wrote: > > Question: > > > How does pair(4) interact with pf? If a packet crosses a pair > > > does it create a new state or does pf track the original state? > > > > > > > An

Re: pair(4) + bridge(4): use stp to prevent bridge loops

2015-10-30 Thread Sebastian Benoit
i like this. ok Reyk Floeter(r...@openbsd.org) on 2015.10.30 11:34:39 +0100: > Hi, > > as documented below, pairs in bridges can lead to a loop. > > I looked at "fixing" it but came to the conclusion a) there is no > satisfying way with mbuf flags/tags to prevent the loop, b) it would > limit th

Re: pair(4) + bridge(4): use stp to prevent bridge loops

2015-10-30 Thread Reyk Floeter
On Fri, Oct 30, 2015 at 10:24:15AM +, Stuart Henderson wrote: > On 2015/10/30 11:34, Reyk Floeter wrote: > > Hi, > > > > as documented below, pairs in bridges can lead to a loop. > > > > I looked at "fixing" it but came to the conclusion a) there is no > > satisfying way with mbuf flags/tags

bridge(4): splassert: bstp_notify_rtage: want 7 have 5

2015-10-30 Thread Reyk Floeter
Hi, when testing bridge stp, I got the following kernel messages: splassert: bstp_notify_rtage: want 7 have 5 Want IPL_NET have IPL_SOFTNET. I can reproduce it by adding/removing stp ports (stp pair0). As it seems, bstp_notify_rtage() is either indirectly called from the bridge ioctl()

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-10-30 Thread Nicholas Marriott
I think it is never going to rise from the dead. Original message From: Tobias Stoeckmann Date:30/10/2015 10:06 (GMT+00:00) To: "Michael W. Bombardieri" Cc: Nicholas Marriott ,tech@openbsd.org Subject: Re: [PATCH] rcs: buf_free/rcsnum_free On Fri, Oct 30, 2015 at 08:52:

Re: pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Alexander Bluhm
On Fri, Oct 30, 2015 at 10:43:21AM +0100, Reyk Floeter wrote: > Question: > > How does pair(4) interact with pf? If a packet crosses a pair > > does it create a new state or does pf track the original state? > > > > Answer: > It does create a new state, you can filter between pair(4) without > pr

Re: pair(4) + bridge(4): use stp to prevent bridge loops

2015-10-30 Thread Reyk Floeter
FYI, it is a good way to test bridge(4) and STP. # ping 10.1.1.2 works fine in the following setup as rstp blocks bridge1/pair1: bridge0: flags=41 groups: bridge priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp designated: id fe:e1:ba:d0:9d:91 priori

Re: pair(4) + bridge(4): use stp to prevent bridge loops

2015-10-30 Thread Stuart Henderson
On 2015/10/30 11:34, Reyk Floeter wrote: > Hi, > > as documented below, pairs in bridges can lead to a loop. > > I looked at "fixing" it but came to the conclusion a) there is no > satisfying way with mbuf flags/tags to prevent the loop, b) it would > limit the use cases of pair(4) for network te

pair(4) + bridge(4): use stp to prevent bridge loops

2015-10-30 Thread Reyk Floeter
Hi, as documented below, pairs in bridges can lead to a loop. I looked at "fixing" it but came to the conclusion a) there is no satisfying way with mbuf flags/tags to prevent the loop, b) it would limit the use cases of pair(4) for network testing in many ways, c) the bridge loop causes heavy loa

Re: [PATCH] rcs: buf_free/rcsnum_free

2015-10-30 Thread Tobias Stoeckmann
On Fri, Oct 30, 2015 at 08:52:02AM +0800, Michael W. Bombardieri wrote: > Sorry. Here is new diff. Hopefully I haven't missed anything else. You missed OpenCVS, which shares the same code base. But is OpenCVS worth it anymore? Even a harsher question: Is it time to tedu it?

pair(4) + pf(4): reset all state on "reinjected" packets

2015-10-30 Thread Reyk Floeter
Question: > How does pair(4) interact with pf? If a packet crosses a pair > does it create a new state or does pf track the original state? > Answer: It does create a new state, you can filter between pair(4) without problems and all features including nat work. But it currently does not clear so