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]
Message-ID: <20100802154505.46cfe94a@nehalam>
Date:	Mon, 2 Aug 2010 15:45:05 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Changli Gao <xiaosuo@...il.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 4/4] u32: use get_unaligned_be32

On Tue, 3 Aug 2010 06:34:59 +0800
Changli Gao <xiaosuo@...il.com> wrote:

> On Tue, Aug 3, 2010 at 6:00 AM, Stephen Hemminger <shemminger@...tta.com> wrote:
> > U32 classifier reads data from packet at a offset passed in from
> > user space. The offset should be aligned, but it is unsafe practice
> > to depend on values from userspace.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@...tta.com>
> >
> > --- a/net/sched/cls_u32.c       2010-08-01 11:21:06.945820852 -0700
> > +++ b/net/sched/cls_u32.c       2010-08-01 11:24:55.257793848 -0700
> > @@ -41,6 +41,7 @@
> >  #include <net/netlink.h>
> >  #include <net/act_api.h>
> >  #include <net/pkt_cls.h>
> > +#include <asm/unaligned.h>
> >
> >  struct tc_u_knode
> >  {
> > @@ -140,7 +141,7 @@ next_knode:
> >                        data = skb_header_pointer(skb, toff, 4, &_data);
> >                        if (!data)
> >                                goto out;
> > -                       if ((*data ^ key->val) & key->mask) {
> > +                       if ((get_unaligned_be32(data) ^ key->val) & key->mask) {
> 
> be32()? I think it may break configuration.

The data pointer is be32 * already.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ