From: Ben Hutchings <ben@decadent.org.uk>
To: David Miller <davem@davemloft.net>
Cc: romieu@fr.zoreil.com, eric.dumazet@gmail.com,
nhorman@tuxdriver.com, netdev@vger.kernel.org
Subject: Re: [PATCH RFC] r8169: straighten out overlength frame detection (v3)
Date: Sun, 10 Jan 2010 01:57:18 +0000 [thread overview]
Message-ID: <1263088638.2480.210.camel@localhost> (raw)
In-Reply-To: <20100108.160252.189352309.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]
On Fri, 2010-01-08 at 16:02 -0800, David Miller wrote:
[...]
> Whilst the above will end up gobbling up to (16K - BIG_PACKET_SZ)
> worth of innocent frames, the DMA engine seems to keep things at least
> self-consistent.
>
> The only bug seems to be the omission of the LastFrag trigger at the
> proper place.
No, the attacker controls the completion status by writing it in
previous valid frames. Please read the slides
(<http://events.ccc.de/congress/2009/Fahrplan/attachments/1483_26c3_ipv4_fuckups.pdf> pages 80-87).
I suspect that:
1. There is an internal ring buffer for RX DMA containing both frame
payload and completion status
2. When a frame is (slightly?) over-length, the ingress and egress logic
can disagree about the length of payload in the buffer
3. This results in stale data (usually frame payload) being written to
memory as the completion status
It is conceivable that the bug can be avoided simply by rounding the
RxMaxSize.
[...]
> Therefore we shouldn't need to change anything and there is actually
> no "bug" or "exploit" at all. We just end up dropping some RX frames
> because the chip didn't DMA them properly.
The intent of the exploit is precisely to cause other packets to be
dropped!
Ben.
--
Ben Hutchings
Theory and practice are closer in theory than in practice.
- John Levine, moderator of comp.compilers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2010-01-10 1:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-28 19:48 [PATCH RFC] r8169: straighten out overlength frame detection Neil Horman
2009-12-28 19:50 ` Neil Horman
2009-12-28 21:31 ` François romieu
2009-12-28 23:49 ` Neil Horman
2009-12-29 0:24 ` David Dillow
2009-12-29 1:20 ` Neil Horman
2009-12-29 0:51 ` Ben Hutchings
2009-12-29 1:16 ` Neil Horman
2009-12-29 1:29 ` Ben Hutchings
2009-12-29 15:35 ` Neil Horman
2010-01-05 13:57 ` [PATCH RFC] r8169: straighten out overlength frame detection (v3) Neil Horman
2010-01-05 15:15 ` Eric Dumazet
2010-01-05 20:40 ` David Miller
2010-01-05 21:38 ` Neil Horman
2010-01-05 21:45 ` David Miller
2010-01-05 22:04 ` Neil Horman
2010-01-07 1:01 ` Francois Romieu
2010-01-07 1:15 ` David Miller
2010-01-08 23:48 ` Francois Romieu
2010-01-09 0:02 ` David Miller
2010-01-10 1:57 ` Ben Hutchings [this message]
2010-01-10 23:50 ` Francois Romieu
2010-01-11 6:45 ` David Miller
2010-01-12 0:16 ` Francois Romieu
2010-01-12 6:24 ` David Miller
2010-01-26 22:07 ` Brandon Philips
2010-01-30 21:50 ` Neil Horman
2010-02-18 19:37 ` Brandon Philips
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=1263088638.2480.210.camel@localhost \
--to=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=romieu@fr.zoreil.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.
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).