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-next>] [day] [month] [year] [list]
Message-ID: <7448ec710906250613p5fde8b44s24842a32e42dce37@mail.gmail.com>
Date:	Thu, 25 Jun 2009 16:13:59 +0300
From:	Pablo Bitton <pablo.bitton@...il.com>
To:	"Nori, Sekhar" <nsekhar@...com>, netdev@...r.kernel.org
Cc:	"Rajashekhara, Sudhakar" <sudhakar.raj@...com>,
	"Subrahmanya, Chaithrika" <chaithrika@...com>,
	davinci-linux-open-source@...ux.davincidsp.com
Subject: Re: A small fix to davinci_emac driver

Hello all,

I have attached a small fix for the following problem:
When davinci_emac interface is down, changing MAC address results in
kernel oops, due to NULL pointer dereference.

I apologize for not inlining the patch into the message (since GMail
is the only web client I can use, and it does not allow me to inline
it correctly).
Remarks are welcomed.

Thanks in advance.

On Thu, Jun 25, 2009 at 11:31 AM, Nori, Sekhar<nsekhar@...com> wrote:
>
> Pablo,
>
> Chaithrika's mails to gmail.com are bouncing, so I am replying
> on her behalf.
>
> "
> You are right there is indeed an issue. We looked at other
> drivers and found that this is solved by checking for netif_running
> to be true before going ahead and setting the mac address. Have a
> look at how this is done in tg3.c driver
>
> http://git.kernel.org/?p=linux/kernel/git/khilman/linux-davinci.git;a=blob;f=drivers/net/tg3.c;h=201be425643a6fb7acb8801bbbb718897c9a6431;hb=35265abf67337f57a023ffeae5f4c492e7f8ea24#l6589
> "
>
> Can you please go ahead and submit a fix for this to netdev
> mailing list and CC linux-davinci ML?
>
> Thanks,
> Sekhar
>
>> -----Original Message-----
>> From: Pablo Bitton [mailto:pablo.bitton@...il.com]
>> Sent: Wednesday, June 24, 2009 7:13 PM
>> To: Subrahmanya, Chaithrika
>> Subject: A small fix to davinci_emac driver
>>
>> Hello,
>>
>> In drivers/net/davinci_emac.c file, at emac_dev_setmac_addr() function, rxch
>> is NULL when DaVinci EMAC is down (using "ifconfig eth0 down").
>>
>> So when MAC address is changed using "ifconfig eth0 hw ether
>> 00:11:22:33:44:55",
>> emac_dev_setmac_addr() performs an illegal access to rxch->mac_addr, which
>> causes a kernel oops.
>>
>> In order to fix this situation, the attached patch is applied (I've couldn't
>> inline it correctly into GMail).
>> Remarks are welcomed.
>>
>> Thanks in advance.
>

View attachment "0002-davinci_emac-fix-kernel-oops-when-changing-mac-addr.patch.txt" of type "text/plain" (1571 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ