From: Simon Horman <horms@verge.net.au>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: David Miller <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>,
Dan Rosenberg <drosenberg@vsecurity.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Urs Thuermann <urs@isnogud.escape.de>,
security@kernel.org
Subject: Re: can-bcm: fix minor heap overflow
Date: Fri, 12 Nov 2010 11:39:50 +0900 [thread overview]
Message-ID: <20101112023950.GA8145@verge.net.au> (raw)
In-Reply-To: <4CDB1856.4040001@hartkopp.net>
On Wed, Nov 10, 2010 at 11:10:30PM +0100, Oliver Hartkopp wrote:
> 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>
>
> ---
>
> diff --git a/net/can/bcm.c b/net/can/bcm.c
> index 08ffe9e..6faa825 100644
> --- a/net/can/bcm.c
> +++ b/net/can/bcm.c
> @@ -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 */
> };
If the string may be up to 17 bytes long why are you allocating 20?
> static inline struct bcm_sock *bcm_sk(const struct sock *sk)
next prev parent reply other threads:[~2010-11-12 2:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 22:10 can-bcm: fix minor heap overflow Oliver Hartkopp
2010-11-12 2:39 ` Simon Horman [this message]
2010-11-12 2:43 ` Dan Rosenberg
2010-11-12 2:48 ` Simon Horman
2010-11-12 22:07 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101112023950.GA8145@verge.net.au \
--to=horms@verge.net.au \
--cc=davem@davemloft.net \
--cc=drosenberg@vsecurity.com \
--cc=netdev@vger.kernel.org \
--cc=security@kernel.org \
--cc=socketcan@hartkopp.net \
--cc=torvalds@linux-foundation.org \
--cc=urs@isnogud.escape.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).