netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dborkman@redhat.com
Cc: geirola@gmail.com, netdev@vger.kernel.org, linux-sctp@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/6] net: sctp: fix information leaks in ulpevent layer
Date: Mon, 14 Jul 2014 14:19:45 -0700 (PDT)	[thread overview]
Message-ID: <20140714.141945.278096782065573850.davem@davemloft.net> (raw)
In-Reply-To: <1405189840-31171-2-git-send-email-dborkman@redhat.com>

From: Daniel Borkmann <dborkman@redhat.com>
Date: Sat, 12 Jul 2014 20:30:35 +0200

> While working on some other SCTP code, I noticed that some
> structures shared with user space are leaking uninitialized
> stack or heap buffer. In particular, struct sctp_sndrcvinfo
> has a 2 bytes hole between .sinfo_flags and .sinfo_ppid that
> remains unfilled by us in sctp_ulpevent_read_sndrcvinfo() when
> putting this into cmsg. But also struct sctp_remote_error
> contains a 2 bytes hole that we don't fill but place into a skb
> through skb_copy_expand() via sctp_ulpevent_make_remote_error().
 ...
> Fix this by setting both to 0 before filling them out. We also
> have other structures shared between user and kernel space in
> SCTP that contains holes (e.g. struct sctp_paddrthlds), but we
> copy that buffer over from user space first and thus don't need
> to care about it in that cases.
> 
> While at it, we can also remove lengthy comments copied from
> the draft, instead, we update the comment with the correct RFC
> number where one can look it up.
> 
> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>

Applied to 'net' and queued up for -stable.

I'll get to the rest of this series after I next merge net into
net-next, thanks.

  reply	other threads:[~2014-07-14 21:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-12 18:30 [PATCH net-next v2 0/6] SCTP updates Daniel Borkmann
2014-07-12 18:30 ` [PATCH net-next v2 1/6] net: sctp: fix information leaks in ulpevent layer Daniel Borkmann
2014-07-14 21:19   ` David Miller [this message]
2014-07-15  7:00     ` Daniel Borkmann
2014-07-12 18:30 ` [PATCH net-next v2 5/6] net: sctp: implement rfc6458, 8.1.31. SCTP_DEFAULT_SNDINFO support Daniel Borkmann
2014-07-12 18:30 ` [PATCH net-next v2 6/6] net: sctp: deprecate rfc6458, 5.3.2. SCTP_SNDRCV support Daniel Borkmann
2014-07-16 21:44 ` [PATCH net-next v2 0/6] SCTP updates 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=20140714.141945.278096782065573850.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=geirola@gmail.com \
    --cc=linux-sctp@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).