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
| ||
|
Date: Thu, 13 Oct 2016 12:49:33 -0700 From: Linus Torvalds <torvalds@...ux-foundation.org> To: Markus Trippelsdorf <markus@...ppelsdorf.de> Cc: Christoph Lameter <cl@...ux.com>, Jens Axboe <axboe@...com>, Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Aaron Conole <aconole@...hat.com>, David Miller <davem@...emloft.net>, Pablo Neira Ayuso <pablo@...filter.org>, linux-fsdevel <linux-fsdevel@...r.kernel.org>, Al Viro <viro@...iv.linux.org.uk>, NetFilter <netfilter-devel@...r.kernel.org>, Network Development <netdev@...r.kernel.org>, Andrew Morton <akpm@...ux-foundation.org>, Florian Westphal <fw@...len.de>, "Theodore Ts'o" <tytso@....edu> Subject: Re: slab corruption with current -git On Wed, Oct 12, 2016 at 11:27 PM, Markus Trippelsdorf <markus@...ppelsdorf.de> wrote: > > Yeah. > > 105 entry->orig_ops = reg; > 106 entry->ops = *reg; > 107 entry->next = NULL; So ipt_register_table() does: ret = nf_register_net_hooks(net, ops, hweight32(table->valid_hooks)); and then nf_register_net_hooks() just does for (i = 0; i < n; i++) { err = nf_register_net_hook(net, ®[i]); so if the *reg is uninitialized, it means that it's the 'ops[]' array that isn't actually really valid in "valid_hooks". Odd. They should all be initialized by xt_hook_ops_alloc(), no? That said, xt_hook_ops_alloc() itself is odd. Lookie here, this is the loop that initializes things: for (i = 0, hooknum = 0; i < num_hooks && hook_mask != 0; hook_mask >>= 1, ++hooknum) { and it makes no sense to me how that tests *both* "i < num_hools" and "hook_mask != 0". Why? Because num_hooks = hweight32(hook_mask); so it's entirely redundant. num_hooks is already how many bits are on in hook_mask, so that test is just duplicating the same thing twice ("have we done less than that number of bits" and "do we have any bits less"). I don't know. There's something odd going on. Regardless, thsi is a different problem from the nf_register_net_hook() list handling, so I'll leave it to the networking people. David? Linus
Powered by blists - more mailing lists