Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/compat/netbsd32 Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/9ca697e59f2a
branches: netbsd-8
changeset: 445813:9ca697e59f2a
user: snj <snj%NetBSD.org@localhost>
date: Tue Nov 13 16:55:22 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #1093):
sys/compat/netbsd32/netbsd32_socket.c: 1.48
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 4d0dd6f5d994 -r 9ca697e59f2a sys/compat/netbsd32/netbsd32_socket.c
--- a/sys/compat/netbsd32/netbsd32_socket.c Mon Nov 12 16:03:17 2018 +0000
+++ b/sys/compat/netbsd32/netbsd32_socket.c Tue Nov 13 16:55:22 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_socket.c,v 1.44 2016/09/13 07:01:07 martin Exp $ */
+/* $NetBSD: netbsd32_socket.c,v 1.44.8.1 2018/11/13 16:55:22 snj 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.44 2016/09/13 07:01:07 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.44.8.1 2018/11/13 16:55:22 snj 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