Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-15 Thread Linus Torvalds
On Sat, May 14, 2016 at 2:31 PM, Linus Torvalds wrote: > > "u64" is indeed "unsigned long long" on x86 and many other > architectures, but on alpha and ia64 it's just "unsigned long". Actually, I take that back. In the kernel, it seems to always be "unsigned long

Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread Willy Tarreau
On Sat, May 14, 2016 at 03:21:31PM -0700, Linus Torvalds wrote: > On Sat, May 14, 2016 at 2:33 PM, Willy Tarreau wrote: > > > > Why simply not cast the atomic to (unsigned long long) instead of (u64) > > so that %llu always matches ? > > Yes, that fixes the problem. It's just more

Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread Linus Torvalds
On Sat, May 14, 2016 at 2:33 PM, Willy Tarreau wrote: > > Why simply not cast the atomic to (unsigned long long) instead of (u64) > so that %llu always matches ? Yes, that fixes the problem. It's just more typing, and annoying. The fact that MS got it right while posix and gcc

Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread Willy Tarreau
On Sat, May 14, 2016 at 02:31:04PM -0700, Linus Torvalds wrote: > On Sat, May 14, 2016 at 11:24 AM, Linus Torvalds > wrote: > > > > > > - net->ct.slabname = kasprintf(GFP_KERNEL, "nf_conntrack_%p", net); > > + net->ct.slabname = kasprintf(GFP_KERNEL,

Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread Linus Torvalds
On Sat, May 14, 2016 at 11:24 AM, Linus Torvalds wrote: > > > - net->ct.slabname = kasprintf(GFP_KERNEL, "nf_conntrack_%p", net); > + net->ct.slabname = kasprintf(GFP_KERNEL, "nf_conntrack_%llu", > +

Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread David Miller
From: Linus Torvalds <torva...@linux-foundation.org> Date: Sat, 14 May 2016 11:24:08 -0700 (PDT) > > From: Linus Torvalds <torva...@linux-foundation.org> > Date: Sat, 14 May 2016 11:11:44 -0700 > Subject: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

Re: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread Eric Dumazet
On Sat, 2016-05-14 at 11:24 -0700, Linus Torvalds wrote: > From: Linus Torvalds <torva...@linux-foundation.org> > Date: Sat, 14 May 2016 11:11:44 -0700 > Subject: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name > > The slab name ends up being visible in th

[PATCH] nf_conntrack: avoid kernel pointer value leak in slab name

2016-05-14 Thread Linus Torvalds
From: Linus Torvalds <torva...@linux-foundation.org> Date: Sat, 14 May 2016 11:11:44 -0700 Subject: [PATCH] nf_conntrack: avoid kernel pointer value leak in slab name The slab name ends up being visible in the directory structure under /sys, and even if you don't have access rights to th