All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] typhoon: memory corruption in typhoon_get_drvinfo()
@ 2010-12-20 13:00 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-12-20 13:00 UTC (permalink / raw)
  To: David Dillow; +Cc: netdev, kernel-janitors

info->version only has space for 32 characters but my UTS_RELEASE is
"2.6.37-rc6-next-20101217-05817-ge935fc8-dirty" so it doesn't fit.
This is supposed to be the version of the driver, not the kernel
version.  This driver doesn't have a version so lets just leave it
blank.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Found with static analysis.  Compile tested.

diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 5b83c3f..a3c46f6 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1004,7 +1004,6 @@ typhoon_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 	}
 
 	strcpy(info->driver, KBUILD_MODNAME);
-	strcpy(info->version, UTS_RELEASE);
 	strcpy(info->bus_info, pci_name(pci_dev));
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch -next] typhoon: memory corruption in typhoon_get_drvinfo()
@ 2010-12-20 13:00 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-12-20 13:00 UTC (permalink / raw)
  To: David Dillow; +Cc: netdev, kernel-janitors

info->version only has space for 32 characters but my UTS_RELEASE is
"2.6.37-rc6-next-20101217-05817-ge935fc8-dirty" so it doesn't fit.
This is supposed to be the version of the driver, not the kernel
version.  This driver doesn't have a version so lets just leave it
blank.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Found with static analysis.  Compile tested.

diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 5b83c3f..a3c46f6 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1004,7 +1004,6 @@ typhoon_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 	}
 
 	strcpy(info->driver, KBUILD_MODNAME);
-	strcpy(info->version, UTS_RELEASE);
 	strcpy(info->bus_info, pci_name(pci_dev));
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch -next] typhoon: memory corruption in typhoon_get_drvinfo()
  2010-12-20 13:00 ` Dan Carpenter
@ 2010-12-20 18:43   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-12-20 18:43 UTC (permalink / raw)
  To: error27; +Cc: dave, netdev, kernel-janitors

From: Dan Carpenter <error27@gmail.com>
Date: Mon, 20 Dec 2010 16:00:18 +0300

> info->version only has space for 32 characters but my UTS_RELEASE is
> "2.6.37-rc6-next-20101217-05817-ge935fc8-dirty" so it doesn't fit.
> This is supposed to be the version of the driver, not the kernel
> version.  This driver doesn't have a version so lets just leave it
> blank.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch -next] typhoon: memory corruption in
@ 2010-12-20 18:43   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-12-20 18:43 UTC (permalink / raw)
  To: error27; +Cc: dave, netdev, kernel-janitors

From: Dan Carpenter <error27@gmail.com>
Date: Mon, 20 Dec 2010 16:00:18 +0300

> info->version only has space for 32 characters but my UTS_RELEASE is
> "2.6.37-rc6-next-20101217-05817-ge935fc8-dirty" so it doesn't fit.
> This is supposed to be the version of the driver, not the kernel
> version.  This driver doesn't have a version so lets just leave it
> blank.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-20 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20 13:00 [patch -next] typhoon: memory corruption in typhoon_get_drvinfo() Dan Carpenter
2010-12-20 13:00 ` Dan Carpenter
2010-12-20 18:43 ` David Miller
2010-12-20 18:43   ` [patch -next] typhoon: memory corruption in David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.