Skip to contentSkip to conversation

typhoon: memory corruption in typhoon_get_drvinfo()

PATCH Applied Dan Carpenter 2 participants 2 messages Dec 20, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 typhoon: memory corruption in typhoon_get_drvinfo()

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.

---
Found with static analysis. Compile tested.

drivers/net/typhoon.c +0 -1
index 5b83c3f..a3c46f6 100644
@@ -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));
 }
 
maintainer Applied
#1 lore raw

From: Dan Carpenter <[email protected]>
Date: Mon, 20 Dec 2010 16:00:18 +0300

Quoted 7 lines

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.

Applied, thanks.