From: Oliver Hartkopp Date: Wed, 10 Nov 2010 12:10:30 +0000 (+0000) Subject: can-bcm: fix minor heap overflow X-Git-Tag: firefly_0821_release~10186^2~640 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e2de51a1c73d762ee1b5246053b087e295f4a7e9;p=firefly-linux-kernel-4.4.55.git can-bcm: fix minor heap overflow commit 0597d1b99fcfc2c0eada09a698f85ed413d4ba84 upstream. 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 Signed-off-by: Oliver Hartkopp CC: Linus Torvalds Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/can/bcm.c b/net/can/bcm.c index ff8c69000bf3..4a192f7d93f8 100644 --- a/net/can/bcm.c +++ b/net/can/bcm.c @@ -124,7 +124,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)