lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 14 Aug 2023 14:35:44 +0200
From: Andrzej Turko <andrzej.tadeusz.turko@...il.com>
To: netdev@...r.kernel.org
Subject: Issue with adding classification rules RX flows using ethtool, igb

Hi,

I was trying to add classification rules for RX flows using ethtool,
but I got an invalid argument error.
This happened in two slightly different scenarios:

Dropping packets:

root@...ld-aturko1:~# ethtool -K enp1s0f1 ntuple on
root@...ld-aturko1:~# ethtool -N enp1s0f1 flow-type udp4 dst-port
34567 action -1
rmgr: Cannot insert RX class rule: Invalid argument

At the same time there was a following error message in dmesg:

igb 0000:01:00.1: ethtool -N: The specified action is invalid

As far as I could tell, this message is generated there:
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/intel/igb/igb_ethtool.c#L2916

The reason for it is that the target queue index is higher than the
number of queues (fsp->ring_cookie >= adapter->num_rx_queues).
The ring_cookie field is an unsigned int, so my guess is that the
check for the special semantics of -1 is missing and the value of the
action I specified (-1) is just being treated as a queue to forward
data to.
And because it is stored in an unsigned variable, it ends up being
interpreted as a non-existent queue.


Forwarding to a queue:

root@...ld-aturko1:~# ethtool -K enp1s0f1 ntuple on
root@...ld-aturko1:~# ethtool -N enp1s0f1 flow-type udp4 dst-port 34567 queue 0
rmgr: Cannot insert RX class rule: Invalid argument

In this case I didn't notice any error messages in dmesg.


For reference, my network device is I350 Gigabit Network Connection
1521 and was bound to the igb driver. I have used ethtool 6.4
downloaded from there:
https://mirrors.edge.kernel.org/pub/software/network/ethtool/
Also, those are the queues I had available:

root@...ld-aturko1:~# ethtool -l enp1s0f1
Channel parameters for enp1s0f1:
Pre-set maximums:
RX:             n/a
TX:             n/a
Other:          1
Combined:       8


Are those bugs in ethtool or could these be due to a misconfiguration?


Thanks,
Andrzej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ