This is a note to let you know that I've just added the patch titled net: tso: fix unaligned access to crafted TCP header in helper API to the 3.17-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-tso-fix-unaligned-access-to-crafted-tcp-header-in-helper-api.patch and it can be found in the queue-3.17 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Fri Nov 7 11:36:50 PST 2014 From: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx> Date: Tue, 21 Oct 2014 16:06:05 +0200 Subject: net: tso: fix unaligned access to crafted TCP header in helper API From: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx> [ Upstream commit a63ba13eec092b70d4e5522d692eaeb2f9747387 ] The crafted header start address is from a driver supplied buffer, which one can reasonably expect to be aligned on a 4-bytes boundary. However ATM the TSO helper API is only used by ethernet drivers and the tcp header will then be aligned to a 2-bytes only boundary from the header start address. Signed-off-by: Karl Beldan <karl.beldan@xxxxxxxxxxxxxxxx> Cc: Ezequiel Garcia <ezequiel.garcia@xxxxxxxxxxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- net/core/tso.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/core/tso.c +++ b/net/core/tso.c @@ -1,6 +1,7 @@ #include <linux/export.h> #include <net/ip.h> #include <net/tso.h> +#include <asm/unaligned.h> /* Calculate expected number of TX descriptors */ int tso_count_descs(struct sk_buff *skb) @@ -23,7 +24,7 @@ void tso_build_hdr(struct sk_buff *skb, iph->id = htons(tso->ip_id); iph->tot_len = htons(size + hdr_len - mac_hdr_len); tcph = (struct tcphdr *)(hdr + skb_transport_offset(skb)); - tcph->seq = htonl(tso->tcp_seq); + put_unaligned_be32(tso->tcp_seq, &tcph->seq); tso->ip_id++; if (!is_last) { Patches currently in stable-queue which might be from karl.beldan@xxxxxxxxxxxxxxxx are queue-3.17/net-tso-fix-unaligned-access-to-crafted-tcp-header-in-helper-api.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html