CVS: cvs.openbsd.org: www

2017-03-17 Thread Theo Buehler
CVSROOT:/cvs
Module name:www
Changes by: t...@cvs.openbsd.org2017/03/17 23:00:17

Modified files:
.  : 61.html 

Log message:
R 3.3.3, not 3.3.2. from steve andre'



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 20:58:54

Modified files:
usr.bin/at : at.c 

Log message:
Use recallocarray for growth of the jobs, just because it is a little
beefier than pointers.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 19:50:21

Modified files:
sys/kern   : kern_pledge.c 

Log message:
The "ioctl" pledge which was had functionality split out into "tape",
"bpf", and "inet" can finally go away.  Use a snapshot if you get into
trouble, most likely in pax..



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 19:48:43

Modified files:
lib/libevent   : buffer.c 

Log message:
Use recallocarray() to avoid leaving detritus in memory when resizing
the string buffer.
ok jsing millert



CVS: cvs.openbsd.org: src

2017-03-17 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2017/03/17 14:57:57

Modified files:
usr.sbin/smtpd : mproc.c 

Log message:
switch to recallocarray() and remove useless pre-allocation.

prodded by deraadt@ ok gilles@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Eric Faurot
CVSROOT:/cvs
Module name:src
Changes by: e...@cvs.openbsd.org2017/03/17 14:56:04

Modified files:
usr.sbin/smtpd : iobuf.c 

Log message:
realloc() -> recallocarray().
use calloc() for initial allocation.

prodded by deraadt@ ok gilles@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/03/17 12:33:04

Modified files:
lib/libc/stdlib: malloc.3 

Log message:
remove unneccessary macro;



CVS: cvs.openbsd.org: src

2017-03-17 Thread Rafael Zalamena
CVSROOT:/cvs
Module name:src
Changes by: rzalam...@cvs.openbsd.org   2017/03/17 11:57:40

Modified files:
distrib/sets/lists/base: mi 
distrib/sets/lists/man: mi 
etc: Makefile 
usr.sbin   : Makefile 
Added files:
etc/rc.d   : dhcrelay6 

Log message:
Enable dhcrelay6(8).

ok deraadt@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/03/17 11:24:26

Modified files:
usr.bin/mandoc : apropos.1 man.1 

Log message:
Document man(1) section selection priority,
and correct description of apropos(1) output search order.
Suggested by tb@.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/03/17 11:19:17

Modified files:
sys/kern   : uipc_socket.c uipc_socket2.c 
sys/sys: systm.h 
sys/uvm: uvm_vnode.c 
sys/net: if.c if_pflow.c pf.c pf_ioctl.c pf_norm.c 
 pfvar.h 

Log message:
Revert the NET_LOCK() and bring back pf's contention lock for release.

For the moment the NET_LOCK() is always taken by threads running under
KERNEL_LOCK().  That means it doesn't buy us anything except a possible
deadlock that we did not spot.  So make sure this doesn't happen, we'll
have plenty of time in the next release cycle to stress test it.

ok visa@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/03/17 11:06:25

Modified files:
sys/netinet: ip_carp.c 

Log message:
carp(4) code is always executed in the 'softnet' thread, so remove
unneeded splnet()/splx() dance.

ok mikeb@, bluhm@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 11:00:38

Modified files:
lib/libc/stdlib: malloc.3 

Log message:
Strengthen description of recallocarray(3) behaviour, hoping that readers
make the behaviour -> use case connection.
help from jmc and jsing



CVS: cvs.openbsd.org: src

2017-03-17 Thread Jason McIntyre
CVSROOT:/cvs
Module name:src
Changes by: j...@cvs.openbsd.org2017/03/17 10:45:27

Modified files:
usr.sbin/dhcrelay6: dhcrelay6.8 dhcrelay6.c 

Log message:
various tweaks; ok rzalamena



CVS: cvs.openbsd.org: src

2017-03-17 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2017/03/17 10:06:33

Modified files:
lib/libc/stdio : fvwrite.c 

Log message:
Use recallocarray() to avoid leaving detritus in memory when resizing
the string buffer used by asprintf() and vasprintf().  OK deraadt@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 09:14:40

Modified files:
lib/libc/gen   : fts.c 

Log message:
recallocarray() the string buffer, to avoid leaving such contents
around in the address space.  Don't bother doing so for the buffer
which contains aslr'd pointers...
ok millert



CVS: cvs.openbsd.org: src

2017-03-17 Thread Todd C . Miller
CVSROOT:/cvs
Module name:src
Changes by: mill...@cvs.openbsd.org 2017/03/17 08:59:01

Modified files:
usr.bin/whois  : whois.c 

Log message:
choose_server() does not always return malloc'd memory so pass
in a pointer that gets filled in when there is something to free.
Noticed by sthen@ when looking up a numeric address.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Rafael Zalamena
CVSROOT:/cvs
Module name:src
Changes by: rzalam...@cvs.openbsd.org   2017/03/17 08:59:29

Modified files:
sys/netinet: ip_mroute.c 

Log message:
Be more strict on all route iterations, lets always make sure that we
are not going to get a unicast route by accident.

ok mpi@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 08:53:08

Modified files:
lib/libc/stdio : asprintf.c fgetln.c open_memstream.c 
 vasprintf.c 

Log message:
Use recallocarray() to avoid leaving detritus in memory when resizing
buffers.  We don't bother doing this for objects containing pointers,
but focus on controllable data.
ok millert



CVS: cvs.openbsd.org: src

2017-03-17 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2017/03/17 08:51:41

Modified files:
usr.bin/tmux   : utf8.c cmd-show-messages.c 

Log message:
Fix a couple of argument types.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Theo de Raadt
CVSROOT:/cvs
Module name:src
Changes by: dera...@cvs.openbsd.org 2017/03/17 08:51:26

Modified files:
lib/libutil: imsg-buffer.c 

Log message:
Grow buffers using recallocarray, to avoid the potential dribble that
the standard realloc*() functions can leave behind.  imsg buffers are
sometimes used in protocol stacks which require some secrecy, and layering
violations would be needed to resolve this issue otherwise.
Discussed with many.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Rafael Zalamena
CVSROOT:/cvs
Module name:src
Changes by: rzalam...@cvs.openbsd.org   2017/03/17 08:45:16

Added files:
usr.sbin/dhcrelay6: Makefile bpf.c dhcp.h dhcpd.h dhcrelay6.8 
dhcrelay6.c dispatch.c log.c log.h packet.c 

Log message:
Import the DHCPv6 relay implementation.

This code was based on the dhcrelay(8) daemon and shares a lot of the
structures and functions. This daemon implements the following RFCs:
* RFC 3315 Section 20: Relay Agent Behavior
* RFC 4649: Relay Agent Remote-ID option
* RFC 6221: Lightweight DHCPv6 Relay Agent



CVS: cvs.openbsd.org: src

2017-03-17 Thread Nicholas Marriott
CVSROOT:/cvs
Module name:src
Changes by: n...@cvs.openbsd.org2017/03/17 08:41:54

Modified files:
usr.bin/tmux   : window-choose.c 

Log message:
Add h and l for collapse and expand in choose mode with vi(1) keys, from
Gregory Pakosz.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Rafael Zalamena
CVSROOT:/cvs
Module name:src
Changes by: rzalam...@cvs.openbsd.org   2017/03/17 08:31:15

src/usr.sbin/dhcrelay6

Update of /cvs/src/usr.sbin/dhcrelay6
In directory cvs.openbsd.org:/tmp/cvs-serv81340/dhcrelay6

Log Message:
Directory /cvs/src/usr.sbin/dhcrelay6 added to the repository



CVS: cvs.openbsd.org: src

2017-03-17 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/03/17 06:55:52

Modified files:
usr.bin/mandoc : man.cgi.8 

Log message:
Update HISTORY and AUTHORS: we no longer use SQLite.
Outdated information reported by an Anonymous Coward on undeadly.org.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Ingo Schwarze
CVSROOT:/cvs
Module name:src
Changes by: schwa...@cvs.openbsd.org2017/03/17 06:06:02

Modified files:
usr.bin/mandoc : man_html.c mdoc_html.c 

Log message:
Fix regression in mdoc_html.c 1.150, man_html 1.87:
For .Sh, .Ss, .SH, .SS, only write selflink if an id could be constructed.
Crash reported by Raf Czlonka ,
analysis of root cause by natano@



CVS: cvs.openbsd.org: src

2017-03-17 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/03/17 03:26:28

Modified files:
sys/dev/usb: ubcmtp.c 

Log message:
More debug goo to help tracking the use-after-free.



CVS: cvs.openbsd.org: src

2017-03-17 Thread Martin Pieuchot
CVSROOT:/cvs
Module name:src
Changes by: m...@cvs.openbsd.org2017/03/17 03:25:59

Modified files:
sys/dev/usb: usbdi.c 

Log message:
ubcmtp(4) works because of a use-after-free.  Many more drivers are
certainly doing the same.

So revert r1.85 for the moment, we're too close from the release and
these bugs have been there for years.

Regression reported by tb@ on bugs@