From: David Miller <davem@davemloft.net>
To: tom@herbertland.com
Cc: netdev@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH net-next] ila: Fix crash caused by rhashtable changes
Date: Wed, 02 Nov 2016 15:27:11 -0400 (EDT) [thread overview]
Message-ID: <20161102.152711.1206261970590164814.davem@davemloft.net> (raw)
In-Reply-To: <20161101215525.360859-1-tom@herbertland.com>
From: Tom Herbert <tom@herbertland.com>
Date: Tue, 1 Nov 2016 14:55:25 -0700
> commit ca26893f05e86 ("rhashtable: Add rhlist interface")
> added a field to rhashtable_iter so that length became 56 bytes
> and would exceed the size of args in netlink_callback (which is
> 48 bytes). The netlink diag dump function already has been
> allocating a iter structure and storing the pointed to that
> in the args of netlink_callback. ila_xlat also uses
> rhahstable_iter but is still putting that directly in
> the arg block. Now since rhashtable_iter size is increased
> we are overwriting beyond the structure. The next field
> happens to be cb_mutex pointer in netlink_sock and hence the crash.
>
> Fix is to alloc the rhashtable_iter and save it as pointer
> in arg.
>
> Tested:
>
> modprobe ila
> ./ip ila add loc 3333:0:0:0 loc_match 2222:0:0:1,
> ./ip ila list # NO crash now
>
> Signed-off-by: Tom Herbert <tom@herbertland.com>
Applied.
prev parent reply other threads:[~2016-11-02 19:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 21:55 [PATCH net-next] ila: Fix crash caused by rhashtable changes Tom Herbert
2016-11-02 19:27 ` David Miller [this message]
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=20161102.152711.1206261970590164814.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=tom@herbertland.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).