From: Eugene Teo <eugeneteo@kernel.sg>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
jeff@garzik.org, Florin Malita <fmalita@gmail.com>
Subject: Re: [2.6 patch] drivers/net/wireless/libertas/rx.c: fix use-after-free
Date: Mon, 21 May 2007 22:30:22 +0800 [thread overview]
Message-ID: <20070521143022.GA26452@kernel.sg> (raw)
In-Reply-To: <20070521133124.GB9621@tuxdriver.com>
<quote sender="John W. Linville">
> On Sat, May 19, 2007 at 11:14:10AM +0800, Eugene Teo wrote:
> > John W. Linville wrote:
>
> > >> done:
> > >> LEAVE();
> > >>
> > >> - skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
> > >> -
> > >
> > > Except for this part...is this intentional?
> >
> > skb could have been freed by then. And, in libertas_upload_rx_packet(), skb->protocol
> > is initialized by eth_type_trans(skb, priv->wlan_dev.netdev).
>
> OK, I see that. Looks like Florin has reposted his patch, still
> without this hunk. Would you like to submit a patch for this hunk?
skb could have been freed by then. Also, in libertas_upload_rx_packet(),
skb->protocol is initialized by eth_type_trans().
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
---
diff -uprN -X 2.6.22-rc2/Documentation/dontdiff 2.6.22-rc2.default/drivers/net/wireless/libertas/rx.c 2.6.22-rc2/drivers/net/wireless/libertas/rx.c
--- 2.6.22-rc2.default/drivers/net/wireless/libertas/rx.c 2007-05-21 22:07:50.000000000 +0800
+++ 2.6.22-rc2/drivers/net/wireless/libertas/rx.c 2007-05-21 22:08:44.000000000 +0800
@@ -453,7 +453,5 @@ static int process_rxed_802_11_packet(wl
done:
LEAVE();
- skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
-
return (ret);
}
--
1024D/58DF8823 print 47B9 90F6 AE4A 9C51 37E0 D6E1 EA84 C6A2 58DF 8823
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }
WARNING: multiple messages have this Message-ID (diff)
From: Eugene Teo <eugeneteo@kernel.sg>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
jeff@garzik.org, Florin Malita <fmalita@gmail.com>
Subject: Re: [2.6 patch] drivers/net/wireless/libertas/rx.c: fix use-after-free
Date: Mon, 21 May 2007 22:30:22 +0800 [thread overview]
Message-ID: <20070521143022.GA26452@kernel.sg> (raw)
In-Reply-To: <20070521133124.GB9621@tuxdriver.com>
<quote sender="John W. Linville">
> On Sat, May 19, 2007 at 11:14:10AM +0800, Eugene Teo wrote:
> > John W. Linville wrote:
>
> > >> done:
> > >> LEAVE();
> > >>
> > >> - skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
> > >> -
> > >
> > > Except for this part...is this intentional?
> >
> > skb could have been freed by then. And, in libertas_upload_rx_packet(), skb->protocol
> > is initialized by eth_type_trans(skb, priv->wlan_dev.netdev).
>
> OK, I see that. Looks like Florin has reposted his patch, still
> without this hunk. Would you like to submit a patch for this hunk?
skb could have been freed by then. Also, in libertas_upload_rx_packet(),
skb->protocol is initialized by eth_type_trans().
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Eugene Teo <eugeneteo@kernel.sg>
---
diff -uprN -X 2.6.22-rc2/Documentation/dontdiff 2.6.22-rc2.default/drivers/net/wireless/libertas/rx.c 2.6.22-rc2/drivers/net/wireless/libertas/rx.c
--- 2.6.22-rc2.default/drivers/net/wireless/libertas/rx.c 2007-05-21 22:07:50.000000000 +0800
+++ 2.6.22-rc2/drivers/net/wireless/libertas/rx.c 2007-05-21 22:08:44.000000000 +0800
@@ -453,7 +453,5 @@ static int process_rxed_802_11_packet(wl
done:
LEAVE();
- skb->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
-
return (ret);
}
--
1024D/58DF8823 print 47B9 90F6 AE4A 9C51 37E0 D6E1 EA84 C6A2 58DF 8823
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }
next prev parent reply other threads:[~2007-05-21 14:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-18 16:50 [2.6 patch] drivers/net/wireless/libertas/rx.c: fix use-after-free Eugene Teo
2007-05-18 17:46 ` John W. Linville
2007-05-19 3:14 ` Eugene Teo
2007-05-21 13:31 ` John W. Linville
2007-05-21 14:30 ` Eugene Teo [this message]
2007-05-21 14:30 ` Eugene Teo
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=20070521143022.GA26452@kernel.sg \
--to=eugeneteo@kernel.sg \
--cc=fmalita@gmail.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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.