FreeBSD Bugzilla – Attachment 236403 Details for
Bug 266124
SIOCSTAT1 on /dev/ipstate causes a kernel stack buffer overflow
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Remove SIOCSTAT1 from ip_stat
ipfilter.patch (text/plain), 2.71 KB, created by
Cy Schubert
on 2022-09-06 21:06:50 UTC
(
hide
)
Description:
Remove SIOCSTAT1 from ip_stat
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2022-09-06 21:06:50 UTC
Size:
2.71 KB
patch
obsolete
>From b998700ea823f993338be99c8719c1145e0ca8c8 Mon Sep 17 00:00:00 2001 >From: Cy Schubert <cy@FreeBSD.org> >Date: Thu, 24 Mar 2022 20:15:49 -0700 >Subject: [PATCH 1/2] ipfilter: Remove IPL_SELECT > >IPL_SELECT was used for HP-UX >= 11.11 only. Remove this de trop code. > >MFC after: 3 days >--- > sys/netpfil/ipfilter/netinet/ip_log.c | 14 -------------- > 1 file changed, 14 deletions(-) > >diff --git a/sys/netpfil/ipfilter/netinet/ip_log.c b/sys/netpfil/ipfilter/netinet/ip_log.c >index 56b2620fc9a2..6e384ac44e83 100644 >--- a/sys/netpfil/ipfilter/netinet/ip_log.c >+++ b/sys/netpfil/ipfilter/netinet/ip_log.c >@@ -109,13 +109,6 @@ > > #ifdef IPFILTER_LOG > >-# if defined(IPL_SELECT) >-# include <machine/sys/user.h> >-# include <sys/kthread_iface.h> >-# define READ_COLLISION 0x001 >-extern int selwait; >-# endif /* IPL_SELECT */ >- > typedef struct ipf_log_softc_s { > ipfmutex_t ipl_mutex[IPL_LOGSIZE]; > # if SOLARIS && defined(_KERNEL) >@@ -239,10 +232,6 @@ ipf_log_soft_init(ipf_main_softc_t *softc, void *arg) > softl->ipll[i] = NULL; > softl->iplh[i] = &softl->iplt[i]; > bzero((char *)&softl->ipl_crc[i], sizeof(softl->ipl_crc[i])); >-# ifdef IPL_SELECT >- softl->iplog_ss[i].read_waiter = 0; >- softl->iplog_ss[i].state = 0; >-# endif > } > > >@@ -625,9 +614,6 @@ ipf_log_items(ipf_main_softc_t *softc, int unit, fr_info_t *fin, void **items, > POLLWAKEUP(unit); > # endif > SPL_X(s); >-# ifdef IPL_SELECT >- iplog_input_ready(unit); >-# endif > return (0); > } > >-- >2.37.3 > >From d35378171fc0e038b335713ef322bd083aa42a98 Mon Sep 17 00:00:00 2001 >From: Cy Schubert <cy@FreeBSD.org> >Date: Tue, 6 Sep 2022 13:58:35 -0700 >Subject: [PATCH 2/2] ipfilter: Remove unused ioctl > >The SIOCSTAT1 ioctl is only used in ip_auth and is unused in ip_state. >The ip_state version was likely added to support a new statistic yet to >be developed in ipfstat(8). Let's remove it now and consider it at a >later date. > >PR: 266124 >Reported by: Robert Morris <rtm@lcs.mit.edu> >MFC after: 3 days >--- > sys/netpfil/ipfilter/netinet/ip_state.c | 12 ------------ > 1 file changed, 12 deletions(-) > >diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c >index cc0e8559fb16..463416f454a9 100644 >--- a/sys/netpfil/ipfilter/netinet/ip_state.c >+++ b/sys/netpfil/ipfilter/netinet/ip_state.c >@@ -751,18 +751,6 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, > error = ipf_state_getent(softc, softs, data); > break; > >- /* >- * Return a copy of the hash table bucket lengths >- */ >- case SIOCSTAT1 : >- error = BCOPYOUT(softs->ipf_state_stats.iss_bucketlen, data, >- softs->ipf_state_size * sizeof(u_int)); >- if (error != 0) { >- IPFERROR(100017); >- error = EFAULT; >- } >- break; >- > case SIOCGENITER : > { > ipftoken_t *token; >-- >2.37.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 266124
: 236403