Bug 121141 - ax88179_178a devices produce overly long Ethernet frames
Summary: ax88179_178a devices produce overly long Ethernet frames
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-29 09:06 UTC by chrysn
Modified: 2020-07-14 21:18 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg from connecting to disconnecting the device (1.39 KB, text/plain)
2016-07-12 14:08 UTC, chrysn
Details
pcapng dump of traffic over the network interface during address configuration (3.80 KB, application/octet-stream)
2016-07-12 14:09 UTC, chrysn
Details

Description chrysn 2016-06-29 09:06:17 UTC
Every package received via an ax88179_178a driven device (observed on Delock branded "62417" USB3 gigabit Ethernet adapter, reporting as "0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet" on lsusb) has two additional bytes appended to it. Wireshark interprets them as "VSS-Monitoring ethernet trailer". (Seems to be some kind of Ethernet management devices that append debug data to the frames they send).

Apart from the odd lines in network captures, this confuses tools like `scan6` that can't cope with overlong frames (which might be a bug by itself, but still).

I've tried stripping the abundant bytes away with `{ax_,}skb->len = pkt_len - 2` in the ax88179_rx_fixup function (both code paths are affected, the second is only triggered when more than a few package are exchanged); that partially works (the VSS lines disappear from wireshark, and `scan6` starts working), but negatively affects other connections (TLS and SSH connections break randomly); a proper fix would require understanding of which sizes in the skb do what, of how much wireshark can be trusted when it comes to a corrupt device, and a failure case that is easier to debug at packet inspection level than a failing SSH connection, none of which I have right now.

I'd be happy to provide any further data or test any patches (or, given it's relatively cheap adapter, have a sample device sent to whomever wants to fix this).
Comment 1 [account disabled by administrator] 2016-07-09 20:18:25 UTC
Has this worked before in older kernel versions or not. If it has why not try bisecting it to see the introduced bad commit into the current kernel release.
Comment 2 chrysn 2016-07-10 10:33:33 UTC
there have always been the abundant bytes as long as i have used the device (around 3.16-ish); i only started digging down deeper now because i started using scan6 which relies/-d on the package lengths.
Comment 3 [account disabled by administrator] 2016-07-10 21:16:46 UTC
Try bisecting it seems to me that something screwed up when dealing with packets on the adaptor your using.
Comment 4 chrysn 2016-07-11 14:31:23 UTC
i don't have any good version to bisect it against. the driver was introduced between 3.8 and 3.9. i've just now tested kernel versions back to 3.11 for which i had a live image around, and the bug already existed there.
Comment 5 [account disabled by administrator] 2016-07-11 18:15:31 UTC
Ok that's a good start. Can you send me your dmesg and wireshark outputs.
Comment 6 chrysn 2016-07-12 14:08:55 UTC
Created attachment 223001 [details]
dmesg from connecting to disconnecting the device
Comment 7 chrysn 2016-07-12 14:09:56 UTC
Created attachment 223011 [details]
pcapng dump of traffic over the network interface during address configuration

i've taken the liberty to filter out the masses of mdns packages that were originally part of the dump
Comment 8 [account disabled by administrator] 2016-07-12 18:55:35 UTC
Ok seems that this line can be removed:
ax_skb->data = skb->data + 2;
and try removing this line too, may need it still but let's see:
 skb_pull(skb, 2);
Comment 9 invalid 2017-12-21 14:48:11 UTC
Using the driver from http://www.asix.com.tw/download.php?sub=driverdetail&PItemID=131 fixes the issue. Maybe their sources give a hint, what's wrong.
Comment 10 invalid 2017-12-21 15:26:14 UTC
(In reply to ehlers from comment #9)
> Using the driver from
> http://www.asix.com.tw/download.php?sub=driverdetail&PItemID=131 fixes the
> issue. Maybe their sources give a hint, what's wrong.
Forget to mention, that I was testing with kernel v4.9.65
Comment 11 mharo 2020-07-14 21:18:40 UTC
FYI this blog post covers this issue pretty well - https://blog.inoki.cc/2019/12/12/Bug_AX88179_178a_USB_Ethernet_adapter_Linux_Driver/

Note You need to log in before you can comment on or make changes to this bug.