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:	Tue, 02 Sep 2008 16:31:44 -0700
From:	Zachary Amsden <zach@...are.com>
To:	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>
Cc:	Qicheng Christopher Li <chrisl@...are.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"arvidjaar@...l.ru" <arvidjaar@...l.ru>,
	"Allan, Bruce W" <bruce.w.allan@...el.com>,
	"jeff@...zik.org" <jeff@...zik.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"Ronciak, John" <john.ronciak@...el.com>,
	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>,
	Pratap Subrahmanyam <pratap@...are.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"mm-commits@...r.kernel.org" <mm-commits@...r.kernel.org>
Subject: RE: + e1000e-prevent-corruption-of-eeprom-nvm.patch added to -mm
	tree

On Tue, 2008-09-02 at 14:58 -0700, Brandeburg, Jesse wrote:
> First, off, added netdev..., someone else can add lkml if they so
> choose.
> 
> akpm@...ux-foundation.org wrote:
> > The patch titled
> >      e1000e: prevent corruption of EEPROM/NVM
> > has been added to the -mm tree.  Its filename is
> >      e1000e-prevent-corruption-of-eeprom-nvm.patch
> 
> This is disturbing, where did this come from? Personal email?  I now
> have a spate of *FIVE* reports similar to this, but I haven't see any
> other messages on this issue from this user besides andrew's commit.  I
> think it may be a real problem, it is same problem as:
> http://bugzilla.kernel.org/show_bug.cgi?id=11382
> 
> <snip>
> > Subject: e1000e: prevent corruption of EEPROM/NVM
> > From: Christopher Li <chrisl@...are.com>
> >
> > Andrey reports e1000e corruption, and that a patch in vmware's ESX
> > fixed
> > it.
> >
> > The EEPROM corruption is triggered by concurrent access of the EEPROM
> > read/write. Putting a lock around it solve the problem.
> >
> <snip>  I'd like to know how this actually solves a problem outside
> vmware.

Yes.  This was observed on a physical E1000 device.

> VMWare issues really do not apply to the Linux kernel, and unless the
> architecture of ethtool->ioctl->rtnl->e1000e has changed without me
> noticing.  In that case every driver that used ethtool would be broken.

No, any drivers that have a state machine consisting of a base register
that is used to index which datum is read from device EEPROM by the data
register would be broken.

This is not a VMware issue, its a fundamental hardware synchronization
issue caused by the dependence of data read/write on a device register.
Does the net layer protect against e1000 issuing simultaneous EEPROM
read / write?  I have no idea.  It probably should.  Should the driver
take extra precautions of its own to ensure this on non hot-paths, to
avoid corrupting EEPROM memory and resulting in a non-functional NIC?

Absolutely.

>>From casual inspection it looks like set_mtu is done under dev_baselock, while ethtool is done under rtnl_lock.

Setting the MTU internally reads the EEPROM, which could contend with and corrupt and eeprom operations.

Zach

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ