lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 Aug 2016 05:44:49 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Jamal Hadi Salim <jhs@...atatu.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, daniel@...earbox.net,
        xiyou.wangcong@...il.com
Subject: Re: [PATCH v3 net-next 1/1] net_sched: Introduce skbmod action

On Tue, 2016-08-30 at 07:57 -0400, Jamal Hadi Salim wrote:
>         if (flags & SKBMOD_F_SWAPMAC) {
>                 u8 tmpaddr[ETH_ALEN];
>                 /*XXX: I am sure we can come up with something more efficient */
>                 ether_addr_copy(tmpaddr, eth_hdr(skb)->h_dest);
>                 ether_addr_copy(eth_hdr(skb)->h_dest, eth_hdr(skb)->h_source);
>                 ether_addr_copy(eth_hdr(skb)->h_source, tmpaddr);
>         }

While ether_addr_copy() is accepting u8 pointers, data must be aligned to u16 at least.

(See comments in include/linux/etherdevice.h)

Some arches/compilers might do things here that would generate a trap
if tmpaddr is not aligned.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ