From: Steve Muckle <smuckle@codeaurora.org>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Subject: invalid socket structure with ip_early_demux
Date: Fri, 01 Feb 2013 18:08:47 -0800 [thread overview]
Message-ID: <510C752F.5010102@codeaurora.org> (raw)
Recently I've struggled with crashes in the xt_qtaguid netfilter module.
This module is written by Google and used with Android. The match
function in xt_qtaguid eventually tries to access
skb->sk->sk_socket->file
What I find is that the sk->sk_socket pointer is sometimes 0xAAAAAAAA,
or PAGE_POISON. In fact everything after the first 16 bytes of the
struct sock sk is PAGE_POISON. I've confirmed that if I change
PAGE_POISON, the values I see in the sk structure change as well.
I was curious how this structure was being allocated/initialized and
instrumented the sk_alloc, sk_free, and sk_clone_lock functions. When
xt_qtaguid encounters a bad struct sock, that sock does not show up as
ever having been allocated (or freed).
The struct sock is being assigned to the skb in tcb_v4_early_demux(). I
modified that function immediately after the sk is assigned from
__inet_lookup_established() to panic if the sk has a sk_socket pointer
of PAGE_POISON. I can reproduce that condition on my target by simply
attempting to mount an NFS volume. Initiating *and* aborting wget
operations also reproduces the issue - simply initiating a bunch of
wgets is not enough to trigger it.
I have not yet been able to reproduce the bad condition when disabling
ip_early_demux via the sysctl. Any possibility this is an actual issue
with that feature? My target is an MSM using the ks8851 ethernet module.
thanks,
Steve
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next reply other threads:[~2013-02-02 2:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 2:08 Steve Muckle [this message]
2013-02-02 2:16 ` invalid socket structure with ip_early_demux Eric Dumazet
2013-02-02 2:25 ` Eric Dumazet
2013-02-02 2:27 ` Steve Muckle
2013-02-02 2:34 ` Eric Dumazet
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=510C752F.5010102@codeaurora.org \
--to=smuckle@codeaurora.org \
--cc=davem@davemloft.net \
--cc=linux-arm-msm@vger.kernel.org \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.