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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 02 May 2013 11:06:42 +0200
From:	Bjørn Mork <bjorn@...k.no>
To:	Patrick McHardy <kaber@...sh.net>
Cc:	David Miller <davem@...emloft.net>, torvalds@...ux-foundation.org,
	hayeswang@...ltek.com, akpm@...ux-foundation.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [GIT] Networking

Patrick McHardy <kaber@...sh.net> writes:
> On Thu, May 02, 2013 at 04:16:25AM -0400, David Miller wrote:
>> From: Patrick McHardy <kaber@...sh.net>
>> Date: Thu, 2 May 2013 09:03:37 +0200
>> 
>> > I'll also have a look at this.
>> 
>> By the mere existence of /sys/devices/${DEV_PATH}/net/${netdev_name}/flags
>> we have to preserve the bit layout.
>> 
>> So Linus was right.
>> 
>> So network manager is probably reading that flags sysfs file and
>> interpreting it.
>
> Right, that seems plausible. 
>
>> I'll fix the layout to how it was before.
>
> I also found one spot in net/core/dev.c which was using an int for the
> features. Patch attached.

And a couple more attached.

I am also wondering about the consequences of the
ETHTOOL_DEV_FEATURE_WORDS calculation in ethtool.c.  Adding the new
netdev features will make it go from 1 to 2:

#define ETHTOOL_DEV_FEATURE_WORDS	((NETDEV_FEATURE_COUNT + 31) / 32)


But this constant seems to be part of the userspace API AFAICS, so it
cannot just change like that:

static int ethtool_set_features(struct net_device *dev, void __user *useraddr)
{
	struct ethtool_sfeatures cmd;
	struct ethtool_set_features_block features[ETHTOOL_DEV_FEATURE_WORDS];
	netdev_features_t wanted = 0, valid = 0;
	int i, ret = 0;

	if (copy_from_user(&cmd, useraddr, sizeof(cmd)))
		return -EFAULT;
	useraddr += sizeof(cmd);

	if (cmd.size != ETHTOOL_DEV_FEATURE_WORDS)
		return -EINVAL;

..


Is this correctly analyzed?  If so, then I have no clue how to fix
that...



Bjørn



View attachment "0001-net-vlan-ethtool-netdev_features_t-is-more-than-32-b.patch" of type "text/x-diff" (1366 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ