All of lore.kernel.org
 help / color / mirror / Atom feed
From: "f6bvp@free" <f6bvp@free.fr>
To: netdev@vger.kernel.org, Mathias Krause <minipli@googlemail.com>
Subject: Re: [PATCH -next] netrom: fix invalid use of sizeof in nr_recvmsg()
Date: Sun, 21 Apr 2013 19:56:25 +0200	[thread overview]
Message-ID: <51742849.80603@free.fr> (raw)

Hi,

According to the proximity of NetRom and Rose codes I looked at af_rose.c
and it seems that similarly sockaddr_rose structure is let uninitialized 
in rose_recvmsg().

Then, would you consider the following patch interesting to be committed ?

--- a/net/rose/af_rose.c        2013-04-17 07:11:28.000000000 +0200
+++ b/net/rose/af_rose.c        2013-04-21 17:26:06.914967897 +0200
@@ -1257,6 +1257,7 @@ static int rose_recvmsg(struct kiocb *io
         skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);

         if (srose != NULL) {
+               memset(srose, 0, sizeof(*srose));
                 srose->srose_family = AF_ROSE;
                 srose->srose_addr   = rose->dest_addr;
                 srose->srose_call   = rose->dest_call;


Bernard Pidoux

             reply	other threads:[~2013-04-21 17:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-21 17:56 f6bvp@free [this message]
2013-04-21 18:00 ` [PATCH -next] netrom: fix invalid use of sizeof in nr_recvmsg() Mathias Krause
  -- strict thread matches above, loose matches on Subject: below --
2013-04-21 17:39 f6bvp@free
2013-04-21 17:53 ` Mathias Krause
2013-04-21 18:05 ` f6bvp@free
2013-04-09  2:07 Wei Yongjun
2013-04-09  2:49 ` David Miller
2013-04-09  3:05   ` Wei Yongjun
2013-04-09  3:09 ` Hannes Frederic Sowa
2013-04-09  5:49 ` Mathias Krause

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=51742849.80603@free.fr \
    --to=f6bvp@free.fr \
    --cc=minipli@googlemail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.