From: walter harms <wharms@bfs.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Karsten Keil <isdn@linux-pingi.de>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] isdn: mISDN: set ->family in ->getname()
Date: Tue, 23 Apr 2013 09:40:07 +0200 [thread overview]
Message-ID: <51763AD7.10102@bfs.de> (raw)
In-Reply-To: <20130423062414.GC15893@elgon.mountain>
Am 23.04.2013 08:24, schrieb Dan Carpenter:
> The "maddr->family" variable was not set but instead it leaked stack
> information to userspace.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
> index 8b07f83..a838864 100644
> --- a/drivers/isdn/mISDN/socket.c
> +++ b/drivers/isdn/mISDN/socket.c
> @@ -578,6 +578,7 @@ data_sock_getname(struct socket *sock, struct sockaddr *addr,
> lock_sock(sk);
>
> *addr_len = sizeof(*maddr);
> + maddr->family = AF_ISDN;
> maddr->dev = _pms(sk)->dev->id;
> maddr->channel = _pms(sk)->ch.nr;
> maddr->sapi = _pms(sk)->ch.addr & 0xff;
just nitpicking ...
net/nfc/llcp/sock.c has a memset(..0,..) for the struct. Is this an options here also ?
(just to make sure everything is 0 in the beginning)
re,
wh
next prev parent reply other threads:[~2013-04-23 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-23 6:24 [patch] isdn: mISDN: set ->family in ->getname() Dan Carpenter
2013-04-23 7:40 ` walter harms [this message]
2013-04-23 8:02 ` Dan Carpenter
2013-04-25 5:49 ` 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=51763AD7.10102@bfs.de \
--to=wharms@bfs.de \
--cc=dan.carpenter@oracle.com \
--cc=davem@davemloft.net \
--cc=isdn@linux-pingi.de \
--cc=kernel-janitors@vger.kernel.org \
--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 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).