Open kudlatyamroth opened 7 years ago
I also get this on 4.13.0-041300-generic, Ubuntu 17.04
+1, 4.13.3-1-ARCH
In function 'memcpy',
inlined from 'rt_ioctl_iwaplist' at /home/henz/Projects/Netgear-A6210/os/linux/../../os/linux/sta_ioctl.c:549:2:
./include/linux/string.h:305:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
__read_overflow2();
I get the exact same error on the latest kernel of Arch Please fix!!!!!
@yourepitaph wrote:
I get the exact same error on the latest kernel of Arch Please fix!!!!!
You could be a bit more polite and a bit less demanding. This is an open source community driven by volunteers spending spare time to develop software. Nobody's being paid for working here.
This issue is a result of the new config option CONFIG_FORTIFY_SOURCE
, which acts like glibc’s FORTIFY_SOURCE
in trying to detect some bugs with memcpy at compile-time.
As a very dirty workaround, you could disable that config option.
See https://outflux.net/blog/archives/2017/09/05/security-things-in-linux-v4-13/ for an explanation and a few patches in different parts of the kernel source tree.
Note that you will still see a warning during compilation which is potentially serious (see #82).
it looks like working :) no problem with connection after compiling it :) thx
Damn i really got my hopes up when i saw the fix for 4.13 but on Arch linux i still get the error, even when using @genodeftest port-to-413 branch, any suggestions? im on 4.13.9-1-ARCH
In function 'memcpy', inlined from 'rt_ioctl_iwaplist' at /home/../..Netgear-A6210/os/linux/../../os/linux/sta_ioctl.c:549:2: ./include/linux/string.h:305:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter __read_overflow2();
@firemaricius First suggestion: Please put code or terminal output in code blocks. See the "Styling with Markdown is supported" link below the comment box for details.
To all of you:
I guess that Arch (and maybe other distros too) use different (more pedantic) options to build the kernel and its modules, helping us to find programming mistakes. I am not sure whether this is correct, but you can try this (and please report back whether it worked):
In os/linux/sta_ioctl.c:549
, replace addr[0]
with struct sockaddr
so the line looks like this
memcpy(extra, addr, i*sizeof(struct sockaddr));
instead of
memcpy(extra, addr, i*sizeof(addr[0]));
@genodeftest It was actually fixed on arch as well with your solution, I had just cloned your master branch and not the actually fix, so i just manually changed the one character and it compiled just fine.
Thanks a lot for all the work tho the wifi adapter works like a charm now
@genodeftest Thanks a lot for the work!! compiled well, problem fixed! You guys save my life everyday. I just have to know where to look. THANKS!