* + revert-orinoco-information-leakage-due-to-incorrect-padding.patch added to -mm tree
@ 2005-10-15 20:46 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2005-10-15 20:46 UTC (permalink / raw)
To: linux-kernel, alan, mm-commits
The patch titled
revert "orinoco: Information leakage due to incorrect padding"
has been added to the -mm tree. Its filename is
revert-orinoco-information-leakage-due-to-incorrect-padding.patch
From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/wireless/orinoco.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff -puN drivers/net/wireless/orinoco.c~revert-orinoco-information-leakage-due-to-incorrect-padding drivers/net/wireless/orinoco.c
--- devel/drivers/net/wireless/orinoco.c~revert-orinoco-information-leakage-due-to-incorrect-padding 2005-10-15 13:46:12.000000000 -0700
+++ devel-akpm/drivers/net/wireless/orinoco.c 2005-10-15 13:46:37.000000000 -0700
@@ -503,14 +503,9 @@ static int orinoco_xmit(struct sk_buff *
return 0;
}
- /* Check packet length, pad short packets, round up odd length */
- len = max_t(int, ALIGN(skb->len, 2), ETH_ZLEN);
- if (skb->len < len) {
- skb = skb_padto(skb, len);
- if (skb == NULL)
- goto fail;
- }
- len -= ETH_HLEN;
+ /* Length of the packet body */
+ /* FIXME: what if the skb is smaller than this? */
+ len = max_t(int,skb->len - ETH_HLEN, ETH_ZLEN - ETH_HLEN);
eh = (struct ethhdr *)skb->data;
@@ -562,7 +557,8 @@ static int orinoco_xmit(struct sk_buff *
p = skb->data;
}
- err = hermes_bap_pwrite(hw, USER_BAP, p, data_len,
+ /* Round up for odd length packets */
+ err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2),
txfid, data_off);
if (err) {
printk(KERN_ERR "%s: Error %d writing packet to BAP\n",
_
Patches currently in -mm which might be from linux-kernel@vger.kernel.org are
revert-orinoco-information-leakage-due-to-incorrect-padding.patch
reiser4-only.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-15 20:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-15 20:46 + revert-orinoco-information-leakage-due-to-incorrect-padding.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®