From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/3] mac80211: verify that skb data is present
Date: Fri, 26 Oct 2012 12:19:42 +0200 [thread overview]
Message-ID: <1351246782.10813.9.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20121026005748.GA30982@shredder> (sfid-20121026_025756_120637_43AD3510)
On Thu, 2012-10-25 at 17:57 -0700, Thomas Pedersen wrote:
> Oh, that hunk is already inside the MESH_FLAGS_AE check... so:
>
>
> if (mesh_hdr->flags & MESH_FLAGS_AE_A4) {
> mpp_addr = hdr->addr3;
> proxied_addr = mesh_hdr->eaddr1;
> } else if (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6) {
> mpp_addr = hdr->addr4;
> proxied_addr = mesh_hdr->eaddr2;
> } else
> return RX_DROP_MONITOR;
>
> Should be ok since we already made sure to have enough data for each
> address extension size.
But that loses the is_multicast_ether_addr() check now, no? I mean, we
wouldn't want to accept an AE_A4 frame unless A1 was multicast, at least
not according to the original code?
All I was trying to make sure is that eaddr1/2 exist when they're used,
and that's the length check, but is equivalent (due to earlier checks)
to testing AE_A4/AE_A5_A6, I think?
None of your versions seem to be equivalent of the original code, which
says that
* multicast -> use addr3/eaddr1
* unicast -> use addr4/eaddr2
and I'm just adding checks that eaddr1/eaddr2 actually exist.
Ohh, ok, no I see, I'm not doing that. What we really need to do is
something entirely different:
if (is_multicast_ether_addr(hdr->addr1)) {
mpp_addr = hdr->addr3;
proxied_addr = mesh_hdr->eaddr1;
} else if (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6) {
/* has_a4 already checked in ieee80211_rx_mesh_check */
mpp_addr = hdr->addr4;
proxied_addr = mesh_hdr->eaddr2;
} else {
return RX_DROP_MONITOR;
}
johannes
next prev parent reply other threads:[~2012-10-26 10:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 22:46 [PATCH 0/3] mac80211: audit for access to skb data Johannes Berg
2012-10-25 22:46 ` [PATCH 1/3] mac80211: check management frame header length Johannes Berg
2012-10-25 22:46 ` [PATCH 2/3] mac80211: verify that skb data is present Johannes Berg
2012-10-25 23:05 ` Thomas Pedersen
2012-10-25 23:58 ` Thomas Pedersen
2012-10-26 0:57 ` Thomas Pedersen
2012-10-26 10:19 ` Johannes Berg [this message]
2012-10-26 10:21 ` Johannes Berg
2012-10-26 11:00 ` [PATCH v2 " Johannes Berg
2012-10-26 16:29 ` Thomas Pedersen
2012-10-26 16:35 ` Johannes Berg
2012-10-25 22:46 ` [PATCH 3/3] mac80211: make sure data is accessible in EAPOL check Johannes Berg
2012-10-29 9:09 ` [PATCH 0/3] mac80211: audit for access to skb data Johannes Berg
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=1351246782.10813.9.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=thomas@cozybit.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 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.