mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: akpm@osdl.org
To: linux-kernel@vger.kernel.org, alan@redhat.com,
	mm-commits@vger.kernel.org
Subject: + revert-orinoco-information-leakage-due-to-incorrect-padding.patch added to -mm tree
Date: Sat, 15 Oct 2005 13:46:43 -0700	[thread overview]
Message-ID: <200510152047.j9FKlDGb022996@shell0.pdx.osdl.net> (raw)


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


                 reply	other threads:[~2005-10-15 20:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200510152047.j9FKlDGb022996@shell0.pdx.osdl.net \
    --to=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®