Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159348546
D18366.id51283.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
817 B
Referenced Files
None
Subscribers
None
D18366.id51283.diff
View Options
Index: sys/netinet/cc/cc.h
===================================================================
--- sys/netinet/cc/cc.h
+++ sys/netinet/cc/cc.h
@@ -184,4 +184,6 @@
#define CC_LIST_WUNLOCK() rw_wunlock(&cc_list_lock)
#define CC_LIST_LOCK_ASSERT() rw_assert(&cc_list_lock, RA_LOCKED)
+#define CC_ALGOOPT_LIMIT 2048
+
#endif /* _NETINET_CC_CC_H_ */
Index: sys/netinet/tcp_usrreq.c
===================================================================
--- sys/netinet/tcp_usrreq.c
+++ sys/netinet/tcp_usrreq.c
@@ -1769,6 +1769,8 @@
switch (sopt->sopt_name) {
case TCP_CCALGOOPT:
INP_WUNLOCK(inp);
+ if (sopt->sopt_valsize > CC_ALGOOPT_LIMIT)
+ return (EINVAL);
pbuf = malloc(sopt->sopt_valsize, M_TEMP, M_WAITOK | M_ZERO);
error = sooptcopyin(sopt, pbuf, sopt->sopt_valsize,
sopt->sopt_valsize);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 14, 3:40 AM (11 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33940508
Default Alt Text
D18366.id51283.diff (817 B)
Attached To
Mode
D18366: Limit option_len for the TCP_CCALGOOPT option
Attached
Detach File
Event Timeline
Log In to Comment