+ revert-orinoco-information-leakage-due-to-incorrect-padding.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 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 [email protected] are

revert-orinoco-information-leakage-due-to-incorrect-padding.patch
reiser4-only.patch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux