Re: [PATCH nf] netfilter: x_tables: don't reject valid target size on some architectures

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

 



On Wed, Jun 01, 2016 at 02:04:44AM +0200, Florian Westphal wrote:
> Quoting John Stultz:
>   In updating a 32bit arm device from 4.6 to Linus' current HEAD, I
>   noticed I was having some trouble with networking, and realized that
>   /proc/net/ip_tables_names was suddenly empty.
>   Digging through the registration process, it seems we're catching on the:
> 
>    if (strcmp(t->u.user.name, XT_STANDARD_TARGET) == 0 &&
>        target_offset + sizeof(struct xt_standard_target) != next_offset)
>          return -EINVAL;
> 
>   Where next_offset seems to be 4 bytes larger then the
>   offset + standard_target struct size.
> 
> next_offset needs to be aligned via XT_ALIGN (so we can access all members
> of ip(6)t_entry struct).
> 
> This problem didn't show up on i686 as it only needs 4-byte alignment for
> u64, but iptables userspace on other 32bit arches does insert extra padding.

Applied, thanks Florian.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux