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]
Date:	Mon, 6 Jul 2009 17:23:36 -0500
From:	"Sonasath, Moiz" <m-sonasath@...com>
To:	"David S. Miller" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"Pandita, Vikram" <vikram.pandita@...com>
Subject: [PATCH] [RFC] Potential bug in defining 'irq field' of 'ifmap
 structure'


From: Moiz Sonasath <m-sonasath@...com>

There seems to be a bug in the ioctl implementation in /kernel/net/core/dev.c 
 
dev_ifsioc_locked()
	case SIOCGIFMAP:
			ifr->ifr_map.irq = dev->irq;   // ?? type mismatch

Here
ifr->ifr_map.irq) is of type unsigned char
dev-irq is of type unsigned int

So ifconfig reports a wrong irq number when the dev->irq number is > 255.

I am confused to see the same typedefs in file: net/if.h 
Not sure how to make changes for the user side net/if.h file?

Signed-off-by: Moiz Sonasath <m-sonasath@...com>
Signed-off-by: Vikram Pandita <vikram.pandita@...com>
	
---
 include/linux/if.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/if.h b/include/linux/if.h
index 2d89c96..1ac6559 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -126,7 +126,7 @@ struct ifmap
 	unsigned long mem_start;
 	unsigned long mem_end;
 	unsigned short base_addr;
-	unsigned char irq;
+	unsigned int irq;
 	unsigned char dma;
 	unsigned char port;
 	/* 3 bytes spare */
-- 
1.5.6.3

--
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