Re: [patch] netfilter: potential NULL dereference in get_inner_hdr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 14 May 2012 09:53:15 Eric Dumazet wrote:
> On Mon, 2012-05-14 at 03:38 -0400, David Miller wrote:
> 
> > He said what he's using, "sparse", the semantic parser, which
> > is largely arch agnostic.
> > 
> > I guarantee you will see the warnings if you run it on your
> > system on this code.
> 
> Some more info :
> 
> http://lwn.net/Articles/205624/
> 
> make C=2 CF=-D__CHECK_ENDIAN__ net/netfilter/xt_HMARK.o
>   CHECK   net/netfilter/xt_HMARK.c
> net/netfilter/xt_HMARK.c:87:21: warning: incorrect type in assignment (different base types)
> net/netfilter/xt_HMARK.c:87:21:    expected unsigned short [unsigned] [usertype] src
> net/netfilter/xt_HMARK.c:87:21:    got restricted __be16 [usertype] all
> net/netfilter/xt_HMARK.c:88:21: warning: incorrect type in assignment (different base types)
> net/netfilter/xt_HMARK.c:88:21:    expected unsigned short [unsigned] [usertype] dst
> net/netfilter/xt_HMARK.c:88:21:    got restricted __be16 [usertype] all
> net/netfilter/xt_HMARK.c:170:27: warning: incorrect type in argument 2 (different signedness)
> net/netfilter/xt_HMARK.c:170:27:    expected int *offset
> net/netfilter/xt_HMARK.c:170:27:    got unsigned int *<noident>
> net/netfilter/xt_HMARK.c:181:28: warning: incorrect type in argument 1 (different base types)
> net/netfilter/xt_HMARK.c:181:28:    expected unsigned int const [usertype] *addr32
> net/netfilter/xt_HMARK.c:181:28:    got restricted __be32 *<noident>
> net/netfilter/xt_HMARK.c:182:28: warning: incorrect type in argument 1 (different base types)
> net/netfilter/xt_HMARK.c:182:28:    expected unsigned int const [usertype] *addr32
> net/netfilter/xt_HMARK.c:182:28:    got restricted __be32 *<noident>
> net/netfilter/xt_HMARK.c:261:9: warning: invalid assignment: &=
> net/netfilter/xt_HMARK.c:261:9:    left side has type unsigned int
> net/netfilter/xt_HMARK.c:261:9:    right side has type restricted __be32
> net/netfilter/xt_HMARK.c:262:9: warning: invalid assignment: &=
> net/netfilter/xt_HMARK.c:262:9:    left side has type unsigned int
> net/netfilter/xt_HMARK.c:262:9:    right side has type restricted __be32
> 

Thanks 
I'll try to fix the warnings

-- 
Regards
Hans Schillstrom <hans.schillstrom@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux