artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5eb7f5
)
Add size check for sockaddr mask.
author
tobhe
<tobhe@openbsd.org>
Sat, 3 Apr 2021 21:29:14 +0000
(21:29 +0000)
committer
tobhe
<tobhe@openbsd.org>
Sat, 3 Apr 2021 21:29:14 +0000
(21:29 +0000)
sbin/iked/vroute.c
patch
|
blob
|
history
diff --git
a/sbin/iked/vroute.c
b/sbin/iked/vroute.c
index
8538edc
..
daca91d
100644
(file)
--- a/
sbin/iked/vroute.c
+++ b/
sbin/iked/vroute.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: vroute.c,v 1.
7 2021/03/25 01:39:09
tobhe Exp $ */
+/* $OpenBSD: vroute.c,v 1.
8 2021/04/03 21:29:14
tobhe Exp $ */
/*
* Copyright (c) 2021 Tobias Heider <tobhe@openbsd.org>
@@
-108,6
+108,8
@@
vroute_getaddr(struct iked *env, struct imsg *imsg)
ptr += addr->sa_len;
left -= addr->sa_len;
+ if (left < sizeof(*mask))
+ fatalx("bad length imsg received");
mask = (struct sockaddr *) ptr;
if (mask->sa_family != af)
return (-1);