mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Matt Johnston <matt@ucc.asn.au>
Cc: musl@lists.openwall.com
Subject: Re: Re: Security advisory for musl libc - stack-based buffer overflow in ipv6 literal parsing [CVE-2015-1817]
Date: Fri, 17 Apr 2015 13:23:27 -0400	[thread overview]
Message-ID: <20150417172327.GB6817@brightrain.aerifal.cx> (raw)
In-Reply-To: <20150417131008.GE17615@ucc.gu.uwa.edu.au>

On Fri, Apr 17, 2015 at 09:10:08PM +0800, Matt Johnston wrote:
> Hi,
> 
> I think Dropbear probably is vulnerable to CVE-2015-1817
> post-authentication. TCP forwarding requests will call
> getaddrinfo() 
> https://secure.ucc.asn.au/hg/dropbear/file/cbd674d63cd4/dbutil.c#l415
> (moved to netio.c in head, and PF_UNSPEC has been fixed to
> AF_UNSPEC). Pre-authentication should be OK, only
> getnameinfo() is called (if that's enabled).

Yes, I agree dropbear is affected.

And wow, this is an utter mess. Not only does dropbear fail to drop
root before processing forwards; it NEVER drops root at all. The
user's session remains running as root for its full lifetime. Aside
from being a huge risk, it also allows users to bypass uid-based
firewall rules via port forwarding; for example, a rule that forbids
normal users from making outgoing connections on port 25 would not be
honored.

Is there any reason for not performing the setgroups/setgid/setuid
immediately after authentication succeeds? Have you looked at whether
it would be easy to patch that in?

None of this excuses CVE-2015-1817 which was a huge failure on our
part, but it seems pretty crazy that dropbear is doing EVERYTHING as
root.

> musl's network-facing DNS code seems a bit precarious with
> pointer arithmetic?

Which code are you talking about? There was a previous problem with
dn_expand, which is the main function that comes to mind for me, and
the code was fixed and heavily reviewed at the time.

Are there other areas you're concerned about?

Rich


  reply	other threads:[~2015-04-17 17:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 13:10 Matt Johnston
2015-04-17 17:23 ` Rich Felker [this message]
2015-04-17 18:03   ` Rich Felker
2015-04-17 18:09     ` Solar Designer
2015-04-18 13:32       ` Matt Johnston
2015-04-18 15:25         ` Rich Felker
2015-04-18 15:49           ` Harald Becker
2015-04-18 15:58             ` Rich Felker
2015-04-18 16:27               ` Harald Becker
2015-04-18 16:37                 ` Rich Felker
2015-04-18 17:07                   ` Harald Becker
2015-04-18 18:27                     ` Laurent Bercot
2015-04-18 18:47                       ` Harald Becker
2015-04-18 18:13                   ` Harald Becker
2015-04-18 19:56                     ` Rich Felker
2015-04-18 21:02                       ` Laurent Bercot
2015-04-19  3:44                         ` Rich Felker
2015-04-20 10:17                           ` Harald Becker
2015-04-20 11:20                             ` Kurt H Maier
2015-04-20 11:35                               ` Harald Becker
2015-04-20 11:50                                 ` Harald Becker
2015-04-20 14:14                                 ` Kurt H Maier
2015-04-20 14:21                                   ` Harald Becker
2015-04-18 18:25                   ` Harald Becker

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=20150417172327.GB6817@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=matt@ucc.asn.au \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).