Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/a63026d48c00
branches: netbsd-7
changeset: 446048:a63026d48c00
user: martin <martin%NetBSD.org@localhost>
date: Wed Nov 21 12:09:03 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1652):
sys/compat/netbsd32/netbsd32_socket.c: revision 1.48 (via patch)
Fix inverted logic, which leads to buffer overflow. Detected by kASan.
diffstat:
sys/compat/netbsd32/netbsd32_socket.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 4ca4f07e745a -r a63026d48c00 sys/compat/netbsd32/netbsd32_socket.c
--- a/sys/compat/netbsd32/netbsd32_socket.c Sun Nov 18 19:43:03 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_socket.c Wed Nov 21 12:09:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_socket.c,v 1.41.14.1 2015/08/08 15:41:54 martin Exp $ */
+/* $NetBSD: netbsd32_socket.c,v 1.41.14.2 2018/11/21 12:09:03 martin Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.41.14.1 2015/08/08 15:41:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.41.14.2 2018/11/21 12:09:03 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -99,7 +99,7 @@
}
ktrkuser("msgcontrol", cmsg, cmsg->cmsg_len);
- error = copyout(&cmsg32, *q, MAX(i, sizeof(cmsg32)));
+ error = copyout(&cmsg32, *q, MIN(i, sizeof(cmsg32)));
if (error)
return (error);
if (i > CMSG32_LEN(0)) {
Home |
Main Index |
Thread Index |
Old Index