From: sohu0106 <sohu0106@126.com>
To: netdev@vger.kernel.org
Subject: Linux kernel: net/irda/af_irda.c: irda_getsockopt() stack infoleak
Date: Thu, 3 Aug 2017 22:00:44 +0800 (CST) [thread overview]
Message-ID: <7486c356.aa32.15da8660616.Coremail.sohu0106@126.com> (raw)
Sometimes irda_getsockopt() doesn't initialize all members of list field of irda_device_list struct. This structure is then copied to
userland. It leads to leaking of contents of kernel stack memory.
2 net/irda/af_irda.c
@@ -2248,6 +2248,8 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
err = -EINVAL;
goto out;
}
+
+ memset( &list, 0, sizeof(struct irda_device_list) );
/* Ask lmp for the current discovery log */
discoveries = irlmp_get_discoveries(&list.len, self->mask.word,
reply other threads:[~2017-08-03 14:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=7486c356.aa32.15da8660616.Coremail.sohu0106@126.com \
--to=sohu0106@126.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox