]> rtime.felk.cvut.cz Git - socketcan-devel.git/commitdiff
can-bcm: fix minor heap overflow
authorhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sat, 13 Nov 2010 16:43:29 +0000 (16:43 +0000)
committerhartkopp <hartkopp@030b6a49-0b11-0410-94ab-b0dab22257f2>
Sat, 13 Nov 2010 16:43:29 +0000 (16:43 +0000)
On 64-bit platforms the ASCII representation of a pointer may be up to 17
bytes long. This patch increases the length of the buffer accordingly.

http://marc.info/?l=linux-netdev&m=128872251418192&w=2

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Upstream Commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0597d1b99fcfc2c0eada09a698f85ed413d4ba84

git-svn-id: svn://svn.berlios.de//socketcan/trunk@1200 030b6a49-0b11-0410-94ab-b0dab22257f2

kernel/2.6/net/can/bcm.c

index 1e4ac669120ccfdf9f702b277ffc537de8cb8e79..9ffad22ae5d8d8eabd95e164929dfbd74caea2d3 100644 (file)
@@ -140,7 +140,7 @@ struct bcm_sock {
        struct list_head tx_ops;
        unsigned long dropped_usr_msgs;
        struct proc_dir_entry *bcm_proc_read;
-       char procname [9]; /* pointer printed in ASCII with \0 */
+       char procname [20]; /* pointer printed in ASCII with \0 */
 };
 
 static inline struct bcm_sock *bcm_sk(const struct sock *sk)