From: David Miller <davem@davemloft.net>
To: ncardwell@google.com
Cc: edumazet@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH net 2/3] inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
Date: Sun, 09 Dec 2012 19:01:38 -0500 (EST) [thread overview]
Message-ID: <20121209.190138.1226210899759529416.davem@davemloft.net> (raw)
In-Reply-To: <1355031803-14547-2-git-send-email-ncardwell@google.com>
From: Neal Cardwell <ncardwell@google.com>
Date: Sun, 9 Dec 2012 00:43:22 -0500
> Add logic to validate INET_DIAG_BC_S_COND and INET_DIAG_BC_D_COND
> operations.
>
> Previously we did not validate the inet_diag_hostcond, address family,
> address length, and prefix length. So a malicious user could make the
> kernel read beyond the end of the bytecode array by claiming to have a
> whole inet_diag_hostcond when the bytecode was not long enough to
> contain a whole inet_diag_hostcond of the given address family. Or
> they could make the kernel read up to about 27 bytes beyond the end of
> a connection address by passing a prefix length that exceeded the
> length of addresses of the given family.
>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
Applied.
next prev parent reply other threads:[~2012-12-10 0:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-09 5:43 [PATCH net 1/3] inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state Neal Cardwell
2012-12-09 5:43 ` [PATCH net 2/3] inet_diag: validate byte code to prevent oops in inet_diag_bc_run() Neal Cardwell
2012-12-10 0:01 ` David Miller [this message]
2012-12-09 5:43 ` [PATCH net 3/3] inet_diag: avoid unsafe and nonsensical prefix matches " Neal Cardwell
2012-12-10 0:01 ` David Miller
2012-12-09 5:46 ` [PATCH net 1/3] inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state David Miller
2012-12-09 6:01 ` Neal Cardwell
2012-12-09 21:15 ` Neal Cardwell
2012-12-09 21:21 ` David Miller
2012-12-10 0:01 ` David Miller
2012-12-10 3:40 ` Neal Cardwell
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=20121209.190138.1226210899759529416.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ncardwell@google.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;
as well as URLs for NNTP newsgroup(s).