diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-10-23 19:58:33 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2019-10-23 19:58:33 +0000 |
commit | 2ebf9d190fd794b22bdb120071520ed77b1c1dcd (patch) | |
tree | ad2c2353179f953dadbd80f94d389875d2f21b64 /sys/netinet/in.h | |
parent | 9cfa71267b5d70d7fb61345493bc9e39baedca58 (diff) |
Kernel is missing propper input validation when configuring addresses.
Fix the SIOCAIFADDR and SIOCDIFADDR ioctl(2) by implementing
in_sa2sin() to validate inet address family and address length.
OK visa@
Diffstat (limited to 'sys/netinet/in.h')
-rw-r--r-- | sys/netinet/in.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 5190efc0206..48111a1c5bc 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in.h,v 1.133 2018/10/13 18:36:01 florian Exp $ */ +/* $OpenBSD: in.h,v 1.134 2019/10/23 19:58:32 bluhm Exp $ */ /* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */ /* @@ -818,6 +818,7 @@ void in_ifdetach(struct ifnet *); int in_mask2len(struct in_addr *); void in_len2mask(struct in_addr *, int); int in_nam2sin(const struct mbuf *, struct sockaddr_in **); +int in_sa2sin(struct sockaddr *, struct sockaddr_in **); char *inet_ntoa(struct in_addr); int inet_nat64(int, const void *, void *, const void *, u_int8_t); |