public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luke Dashjr <luke@dashjr.org>
To: linux-kernel@vger.kernel.org
Subject: Bug? Non-privileged processes can in some cases spoof the wrong sending IP
Date: Tue, 3 Mar 2020 23:03:35 +0000	[thread overview]
Message-ID: <202003032303.36017.luke@dashjr.org> (raw)

It seems non-privileged processes can bind an IP on one interface, and then 
send to addresses not routed through that interface, to spoof that IP on an 
unrelated network (eg, the default route).

Shouldn't there be something to prevent this? Presumably it's not expected 
behaviour, since you can't just bind to any arbitrary addresses...?

(FWIW I can see cases where this might be considered a security issue, but the 
MAINTAINERS file explicitly said address leaks don't count...)

Luke

P.S. I discovered this because Chromium's WebRTC implementation attempts to 
send UDP from configured IPv4 address; and then Linux's MASQUERADE also 
doesn't check that it have the correct return path, so it tried to NAT my WAN 
to my WAN, which resulted in sending out from the origin IP instead of my 
own, and triggered my modem to disconnect me. (I guess this scenario is a bit 
too convoluted to be considered a general DoS risk)

                 reply	other threads:[~2020-03-03 23:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202003032303.36017.luke@dashjr.org \
    --to=luke@dashjr.org \
    --cc=linux-kernel@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