Skip to content

Commit

Permalink
can-bcm: fix minor heap overflow
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Oliver Hartkopp <[email protected]>
CC: Linus Torvalds <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hartkopp authored and davem330 committed Nov 12, 2010
1 parent 6c4f199 commit 0597d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/can/bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,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)
Expand Down

0 comments on commit 0597d1b

Please sign in to comment.