freebsd-dev/usr.sbin/rtadvd
Conrad Meyer 96aec9a5e9 rtadvd(8): Fix a typo in full msg receive logic
Check against the size of the struct, not the pointer.  Previously, a message
with a cm_len between 9 and 23 (inclusive) could cause int msglen to underflow
and read(2) to be invoked with msglen size (implicitly cast to signed),
overrunning the caller-provided buffer.

All users of cm_recv() supply a stack buffer.

On the other hand, the rtadvd control socket appears to only be writable by the
owner, who is probably root.

While here, correct some types to be size_t or ssize_t.

Reported by:	Coverity
CID:		1008477
Security:	unix socket remotes may overflow stack in rtadvd
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 03:37:17 +00:00
..
advcap.c Fix off-by-one. 2014-10-11 23:08:00 +00:00
advcap.h
config.c - Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from 2015-10-22 09:55:40 +00:00
config.h
control_client.c
control_client.h
control_server.c
control_server.h
control.c rtadvd(8): Fix a typo in full msg receive logic 2016-05-12 03:37:17 +00:00
control.h
if.c Use strlcpy(). 2015-10-30 00:33:03 +00:00
if.h
Makefile Now that we own the code, use arc4random(3) unconditionally 2015-10-06 23:42:58 +00:00
Makefile.depend Add META_MODE support. 2015-06-13 19:20:56 +00:00
pathnames.h
rrenum.c Stop including if_var.h from userland. 2015-04-06 09:42:23 +00:00
rrenum.h
rtadvd.8
rtadvd.c usr.sbin: minor spelling fixes on comments. 2016-05-01 16:41:25 +00:00
rtadvd.conf
rtadvd.conf.5 mdoc: sort SEE ALSO. 2014-12-26 21:56:23 +00:00
rtadvd.h - Use time_uptime instead of time_second in data structures for 2013-08-05 20:13:02 +00:00
timer_subr.c - Use time_uptime instead of time_second in data structures for 2013-08-05 20:13:02 +00:00
timer_subr.h - Use time_uptime instead of time_second in data structures for 2013-08-05 20:13:02 +00:00
timer.c Fix build on arm and mips. 2013-08-06 15:49:18 +00:00
timer.h - Use time_uptime instead of time_second in data structures for 2013-08-05 20:13:02 +00:00