From: Ivan Kuten <ivan.kuten@promwad.com>
To: linux-wireless@vger.kernel.org
Subject: PATCH: ieee80211_wep_encrypt_data_fix_unaligned_access.patch
Date: Mon, 24 Nov 2008 15:17:54 -0500 [thread overview]
Message-ID: <492B0BF2.9020505@promwad.com> (raw)
The patch fixes possible unaligned access in ieee80211_wep_encrypt_data function.
Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
--- linux-2.6.28-rc3/net/mac80211/wep.c 2008-11-20 00:04:58.000000000 -0500
+++ linux-2.6.86-rc3.new/net/mac80211/wep.c 2008-11-22 00:37:53.000000000 -0500
@@ -123,10 +123,10 @@
{
struct blkcipher_desc desc = { .tfm = tfm };
struct scatterlist sg;
- __le32 *icv;
+ __le32 icv;
- icv = (__le32 *)(data + data_len);
- *icv = cpu_to_le32(~crc32_le(~0, data, data_len));
+ icv = cpu_to_le32(~crc32_le(~0, data, data_len));
+ put_unaligned(icv, (__le32 *)(data + data_len));
crypto_blkcipher_setkey(tfm, rc4key, klen);
sg_init_one(&sg, data, data_len + WEP_ICV_LEN);
---
Best regards,
Ivan
reply other threads:[~2008-11-24 13:18 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=492B0BF2.9020505@promwad.com \
--to=ivan.kuten@promwad.com \
--cc=linux-wireless@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 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.