Bug 137648 - RHEL4 PATCH dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len
RHEL4 PATCH dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: John W. Linville
Brian Brock
:
Depends On:
Blocks: 135876
  Show dependency treegraph
 
Reported: 2004-10-29 17:52 EDT by Matt Domsch
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-23 19:13:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
net-core-dev.c.patch (644 bytes, patch)
2004-10-29 17:53 EDT, Matt Domsch
no flags Details | Diff
net-core-dev.c-2.6.patch (805 bytes, patch)
2004-11-01 16:43 EST, Matt Domsch
no flags Details | Diff

  None (edit)
Description Matt Domsch 2004-10-29 17:52:27 EDT
Description of problem:
From: Matt Domsch <Matt_Domsch@Dell.com>
To: netdev@oss.sgi.com

If dev->dev_addr is zero, then the memcpy() never takes place, and the
same data that was in the caller's buffer is still in the caller's
buffer on successful return.  The caller can't know that the data in
its buffer isn't the right answer.  So, if dev->dev_dev_addr == 0,
clear the buffer before returning success.

Thanks,
Matt


Version-Release number of selected component (if applicable):
2.6.9-rc1 and earlier 2.6 variants
Comment 1 Matt Domsch 2004-10-29 17:53:38 EDT
Created attachment 105967 [details]
net-core-dev.c.patch

Patch as submitted to netdev@oss.sgi.com for 2.6
Comment 3 Matt Domsch 2004-11-01 16:43:33 EST
Created attachment 106049 [details]
net-core-dev.c-2.6.patch

Updated patch based on discussion on netdev@oss.sgi.com.
For RHEL4, Red Hat may wish not to include the printk, as there are ~30
applications which will cause that printk to trigger, none of which is really
broken.
Comment 6 Dave Jones 2004-11-04 15:48:53 EST
fixed in cvs
Comment 7 Matt Domsch 2004-11-10 15:37:00 EST
FWIW, DaveM applied the first of my patches, not the latter one.  
Which got applied to CVS please?
Comment 8 Dave Jones 2004-11-11 19:37:10 EST
the one from commment #3 (minus the printk)
Comment 9 Amit Bhutani 2004-11-23 19:13:09 EST
Verified, patch from #3 minus the printk statement included in kernel 
2.6.9-1.751_EL. Spoke to Matt and he stated that he didn't care much 
for the printk statement in the first place. Closing the issue as 
this patch meets our needs.


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