Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/netinet6 Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/68749da42d2c
branches: netbsd-8
changeset: 434535:68749da42d2c
user: snj <snj%NetBSD.org@localhost>
date: Tue Jan 09 19:24:44 2018 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #481):
sys/netinet6/ip6_flow.c: revision 1.36
Fix use-after-free: if m_pullup fails the (freed) mbuf is pushed on the
ip6_pktq queue and re-processed later. Return 1 to say "processed and
freed".
diffstat:
sys/netinet6/ip6_flow.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (33 lines):
diff -r bc531a1a0121 -r 68749da42d2c sys/netinet6/ip6_flow.c
--- a/sys/netinet6/ip6_flow.c Tue Jan 09 19:23:04 2018 +0000
+++ b/sys/netinet6/ip6_flow.c Tue Jan 09 19:24:44 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_flow.c,v 1.34.8.1 2018/01/02 10:20:34 snj Exp $ */
+/* $NetBSD: ip6_flow.c,v 1.34.8.2 2018/01/09 19:24:44 snj Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.34.8.1 2018/01/02 10:20:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_flow.c,v 1.34.8.2 2018/01/09 19:24:44 snj Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -285,12 +285,8 @@
if (IP6_HDR_ALIGNED_P(mtod(m, const void *)) == 0) {
if ((m = m_copyup(m, sizeof(struct ip6_hdr),
- (max_linkhdr + 3) & ~3)) == NULL) {
- goto out;
- }
- *mp = m;
- } else if (__predict_false(m->m_len < sizeof(struct ip6_hdr))) {
- if ((m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) {
+ (max_linkhdr + 3) & ~3)) == NULL) {
+ ret = 1;
goto out;
}
*mp = m;
Home |
Main Index |
Thread Index |
Old Index