From: Dan Rosenberg <drosenberg@vsecurity.com>
To: davem@davemloft.net, kuznet@ms2.inr.ac.ru
Cc: netdev@vger.kernel.org, security@kernel.org
Subject: inet_diag insufficient validation?
Date: Wed, 01 Jun 2011 11:40:49 -0400 [thread overview]
Message-ID: <1306942849.3150.10.camel@dan> (raw)
It seems to me that the auditing performed by inet_diag_bc_audit() is
insufficient to prevent pathological INET_DIAG bytecode from doing bad
things.
Firstly, it's possible to cause an infinite loop in inet_diag_bc_audit()
with a INET_DIAG_BC_JMP opcode with a "yes" value of 0. The valid_cc()
function, also called from here, seems suspicious as well.
Once the bytecode is actually run in inet_diag_bc_run(), it looks like
more infinite loops are possible, if appropriate "yes" or "no" values
are set to zero and weren't validated by the audit.
Finally, I can't seem to find any validation that the reported length of
the netlink message header doesn't exceed the skb length, as checked in
some other netlink receive functions, which could result in reading
beyond the bounds of the socket data. I could just be missing something
here though.
Regards,
Dan
next reply other threads:[~2011-06-01 15:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 15:40 Dan Rosenberg [this message]
2011-06-01 15:50 ` inet_diag insufficient validation? Dan Rosenberg
2011-06-03 0:50 ` Dan Rosenberg
2011-06-03 6:55 ` [Security] " Eugene Teo
2011-06-15 14:35 ` Dan Rosenberg
2011-06-17 20:19 ` [PATCH] inet_diag: fix inet_diag_bc_audit() Eric Dumazet
2011-06-17 20:26 ` 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=1306942849.3150.10.camel@dan \
--to=drosenberg@vsecurity.com \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=security@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).