From: Dan Rosenberg <drosenberg@vsecurity.com>
To: jon.maloy@ericsson.com, allan.stephens@windriver.com
Cc: security@kernel.org, netdev@vger.kernel.org
Subject: TIPC security issues
Date: Thu, 21 Oct 2010 19:45:52 -0400 [thread overview]
Message-ID: <1287704752.11051.79.camel@Dan> (raw)
The tipc_msg_build() function in net/tipc/msg.c is written in such a way
as to create a highly exploitable kernel heap overflow that would allow
a local user to escalate privileges to root by issuing maliciously
crafted sendmsg() calls. At a minimum, the following issues should be
fixed:
1. The tipc_msg_calc_data_size() function is almost totally broken. It
sums together size_t values (iov_lens), but returns an integer. Two
things can go wrong - the total value can wrap around, or on 64-bit
platforms, iov_len values greater than UINT_MAX will be truncated.
2. The comparison of dsz to TIPC_MAX_USER_MSG_SIZE is signed, so
negative (large unsigned) values will pass this check.
3. The comparison of sz to max_size is also signed.
As a result of these issues, it's possible to cause the allocation of a
small heap buffer and the subsequent copying of a carefully controlled
larger amount of data into that buffer.
I haven't found a Linux distribution that defines a module alias for
TIPC (even though most compile it as a module), so an administrator will
have had to explicitly load the TIPC module for a system to be
vulnerable.
-Dan
next reply other threads:[~2010-10-21 23:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 23:45 Dan Rosenberg [this message]
2010-10-22 0:31 ` [Security] TIPC security issues Linus Torvalds
2010-10-25 2:14 ` David Miller
2010-10-25 3:42 ` Linus Torvalds
2010-10-25 5:28 ` David Miller
2010-10-27 17:29 ` David Miller
2010-10-27 17:37 ` Linus Torvalds
2010-10-27 17:50 ` David Miller
2010-10-27 18:26 ` Dan Rosenberg
2010-10-27 18:34 ` David Miller
2010-10-27 18:51 ` Linus Torvalds
2010-10-27 19:27 ` David Miller
2010-10-28 15:32 ` Linus Torvalds
2010-10-28 18:45 ` Andy Grover
2010-10-28 18:49 ` David Miller
2010-10-27 18:27 ` Paul Gortmaker
2010-10-27 18:35 ` David Miller
2010-10-27 19:00 ` Paul Gortmaker
2010-10-28 19:51 ` Paul Gortmaker
2010-10-22 13:49 ` Jon Maloy
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=1287704752.11051.79.camel@Dan \
--to=drosenberg@vsecurity.com \
--cc=allan.stephens@windriver.com \
--cc=jon.maloy@ericsson.com \
--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