NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/44030: ifreqn2o gets called with the parameters the wrong way around in /sys/net/if.c
>Number: 44030
>Category: kern
>Synopsis: ifreqn2o gets called with the parameters the wrong way around
>in /sys/net/if.c
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 02 22:15:00 +0000 2010
>Originator: Onno van der Linden
>Release: NetBSD/i386 5.99.39
>Organization:
>Environment:
NetBSD sheep 5.99.39 NetBSD 5.99.39 (SHEEP) #2: Tue Nov 2 22:43:08 MET 2010
onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
>Description:
/sys/compat/sys/sockio.h defines ifreqn2o as #define ifreqn2o(oi, ni) followed
by 2 memcpy()
calls that copy parts of the structure pointed to by ni to the structure
pointed to by oi.
Currently, line 1820 of /sys/net/if.c says: ifreqn2o(ifr, oifr);
Should be the other way around, just like the call to ifreqo2n got fixed
earlier this year.
>How-To-Repeat:
Read the code, see also kern/42585
>Fix:
*** /sys/net/if.c.orig Tue Nov 2 22:42:21 2010
--- /sys/net/if.c Tue Nov 2 22:42:25 2010
***************
*** 1817,1823 ****
}
#ifdef COMPAT_OIFREQ
if (cmd != ocmd)
! ifreqn2o(ifr, oifr);
#endif
return error;
--- 1817,1823 ----
}
#ifdef COMPAT_OIFREQ
if (cmd != ocmd)
! ifreqn2o(oifr, ifr);
#endif
return error;
Home |
Main Index |
Thread Index |
Old Index