0

I have followed the instructions given here:

Currently using version 4.13.0-36-generic kernel

How to install TP-LINK T2UH Wireless adapter Driver (Ralink mt7610u)

However the problem is when i get to make command i get the error

In function ‘memcpy’,
    inlined from ‘rt_ioctl_iwaplist’ at /home/dev/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/sta_ioctl.c:696: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 found this GitHub issue comment as a potential solution:

[...] 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]));

I applied this solution (changed the lines) but the problem still remains.

Anyone know how to fix this?

Zanna
  • 70,465

1 Answers1

0

This issue was opened on kerenl 4.13.0 in mt7610u git

ulli-kroll wrote:

FORTIFY_SOURCE is introduced in v4.13 from the kernel self protecting team.
Need some time to fix this, they are maybe more errors like in this driver on mt7612u

And later reported that this issue was fixed, and suggested using the up-to-date version of the git:

Please check current git and close this isssue ..

I'd suggest checking mt7610u git repo - https://github.com/ulli-kroll/mt7610u

Yaron
  • 13,173