summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjtl <jtl@FreeBSD.org>2018-08-14 17:27:41 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-24 15:00:04 +0200
commit823b09647103311555076967369cbc4db70c007a (patch)
tree0b9cc90a7327e8ae380c72548b4d68a126cd1507
parent0e5c59050d22b22ef6a1f37163040505cb6161f0 (diff)
downloadcygnal-823b09647103311555076967369cbc4db70c007a.tar.gz
cygnal-823b09647103311555076967369cbc4db70c007a.tar.bz2
cygnal-823b09647103311555076967369cbc4db70c007a.zip
Implement a limit on on the number of IPv6 reassembly
queues per bucket. There is a hashing algorithm which should distribute IPv6 reassembly queues across the available buckets in a relatively even way. However, if there is a flaw in the hashing algorithm which allows a large number of IPv6 fragment reassembly queues to end up in a single bucket, a per- bucket limit could help mitigate the performance impact of this flaw. Implement such a limit, with a default of twice the maximum number of reassembly queues divided by the number of buckets. Recalculate the limit any time the maximum number of reassembly queues changes. However, allow the user to override the value using a sysctl (net.inet6.ip6.maxfragbucketsize). Reviewed by: jhb Security: FreeBSD-SA-18:10.ip Security: CVE-2018-6923
-rw-r--r--newlib/libc/sys/rtems/include/netinet6/in6.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/newlib/libc/sys/rtems/include/netinet6/in6.h b/newlib/libc/sys/rtems/include/netinet6/in6.h
index 235c9902a..00783e50e 100644
--- a/newlib/libc/sys/rtems/include/netinet6/in6.h
+++ b/newlib/libc/sys/rtems/include/netinet6/in6.h
@@ -643,7 +643,8 @@ struct ip6_mtuinfo {
#define IPV6CTL_INTRDQMAXLEN 52 /* max length of direct IPv6 netisr
* queue */
#define IPV6CTL_MAXFRAGSPERPACKET 53 /* Max fragments per packet */
-#define IPV6CTL_MAXID 54
+#define IPV6CTL_MAXFRAGBUCKETSIZE 54 /* Max reassembly queues per bucket */
+#define IPV6CTL_MAXID 55
#endif /* __BSD_VISIBLE */
/*