Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-08-01 Thread Trond Myklebust
On Tue, 2017-08-01 at 13:50 -0400, da...@codemonkey.org.uk wrote: > On Tue, Aug 01, 2017 at 10:20:31AM -0700, Linus Torvalds wrote: > > > So I think the 'pathname' part may actually be entirely a red > herring, > > and it's the underlying access itself that just picks up a random > > pointer fr

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-08-01 Thread Linus Torvalds
On Tue, Aug 1, 2017 at 10:20 AM, Linus Torvalds wrote: > > So I think the 'pathname' part may actually be entirely a red herring, > and it's the underlying access itself that just picks up a random > pointer from a stack that now contains something different. And KASAN > didn't notice the stale st

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-08-01 Thread da...@codemonkey.org.uk
On Tue, Aug 01, 2017 at 10:20:31AM -0700, Linus Torvalds wrote: > So I think the 'pathname' part may actually be entirely a red herring, > and it's the underlying access itself that just picks up a random > pointer from a stack that now contains something different. And KASAN > didn't notice t

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-08-01 Thread Trond Myklebust
On Tue, 2017-08-01 at 10:20 -0700, Linus Torvalds wrote: > On Tue, Aug 1, 2017 at 8:51 AM, da...@codemonkey.org.uk > wrote: > > On Mon, Jul 31, 2017 at 10:35:45PM -0700, Linus Torvalds wrote: > > > Any chance of getting the output from > > > > > >./scripts/faddr2line vmlinux > > nfs4_exchan

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-08-01 Thread Linus Torvalds
On Tue, Aug 1, 2017 at 8:51 AM, da...@codemonkey.org.uk wrote: > On Mon, Jul 31, 2017 at 10:35:45PM -0700, Linus Torvalds wrote: > > Any chance of getting the output from > > > >./scripts/faddr2line vmlinux nfs4_exchange_id_done+0x3d7/0x8e0 > > > Hm, that points to this.. > > 7463

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-08-01 Thread da...@codemonkey.org.uk
On Mon, Jul 31, 2017 at 10:35:45PM -0700, Linus Torvalds wrote: > On Mon, Jul 31, 2017 at 8:43 AM, da...@codemonkey.org.uk > wrote: > > Another NFSv4 KASAN splat, this time from rc3. > > > > BUG: KASAN: use-after-free in nfs4_exchange_id_done+0x3d7/0x8e0 [nfsv4] > > Ugh. It's really hard t

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-31 Thread Linus Torvalds
On Mon, Jul 31, 2017 at 8:43 AM, da...@codemonkey.org.uk wrote: > Another NFSv4 KASAN splat, this time from rc3. > > BUG: KASAN: use-after-free in nfs4_exchange_id_done+0x3d7/0x8e0 [nfsv4] Ugh. It's really hard to tell what access that it - KASAN doesn't actually give enough information. There's

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-31 Thread da...@codemonkey.org.uk
Another NFSv4 KASAN splat, this time from rc3. == BUG: KASAN: use-after-free in nfs4_exchange_id_done+0x3d7/0x8e0 [nfsv4] Read of size 8 at addr 8804508af528 by task kworker/2:1/34 CPU: 2 PID: 34 Comm: kworker/2:1 Not tainted 4.

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-17 Thread Linus Torvalds
On Sun, Jul 16, 2017 at 8:05 PM, da...@codemonkey.org.uk wrote: > On Sun, Jul 16, 2017 at 10:57:27PM +, Trond Myklebust wrote: > > > > BUG: KASAN: global-out-of-bounds in call_start+0x93/0x100 > > > Read of size 8 at addr 8d582588 by task kworker/0:1/22 > > > > Does the following p

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-16 Thread da...@codemonkey.org.uk
On Sun, Jul 16, 2017 at 10:57:27PM +, Trond Myklebust wrote: > > BUG: KASAN: global-out-of-bounds in call_start+0x93/0x100 > > Read of size 8 at addr 8d582588 by task kworker/0:1/22 > > Does the following patch fix it? Yep, seems to do the trick! Dave

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-16 Thread Trond Myklebust
Hi Dave, On Sun, 2017-07-16 at 17:15 -0400, Dave Jones wrote: > On Fri, Jul 14, 2017 at 10:25:43AM -0400, Dave Jones wrote: > > On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: > > > Hi Linus, > > > > > > The following changes since commit > 32c1431eea4881a6b17bd7c639315010a

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-16 Thread Dave Jones
On Fri, Jul 14, 2017 at 10:25:43AM -0400, Dave Jones wrote: > On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: > > Hi Linus, > > > > The following changes since commit > 32c1431eea4881a6b17bd7c639315010aeefa452: > > > > Linux 4.12-rc5 (2017-06-11 16:48:20 -0700) >

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Daniel Micay
> I find "hardening" code that adds bugs to be particularly bad and > ugly, the same way that I absolutely *hate* debugging code that turns > out to make debugging impossible (we had that with the "better" stack > tracing code that caused kernel panics to kill the machine entirely > rather than sho

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Daniel Micay
> The reason q_size isn't used is because it doesn't yet prevent read > overflow. The commit message mentions that among the current > limitations > along with __builtin_object_size(ptr, 1). Er rather, in strlcat, the q_size is unused after the fast path is because strnlen obtains the constant aga

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Daniel Micay
On Fri, 2017-07-14 at 13:50 -0700, Linus Torvalds wrote: > On Fri, Jul 14, 2017 at 1:38 PM, Daniel Micay > wrote: > > > > If strscpy treats the count parameter as a *guarantee* of the dest > > size > > rather than a limit, > > No, it's a *limit*. > > And by a *limit*, I mean that we know that w

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Daniel Micay
> My initial patch used strlcpy there, because I wasn't aware of strscpy > before it was suggested: > > http://www.openwall.com/lists/kernel-hardening/2017/05/04/11 > > I was wrong to move it to strscpy. It could be switched back to > strlcpy > again unless the kernel considers the count paramete

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Linus Torvalds
On Fri, Jul 14, 2017 at 1:38 PM, Daniel Micay wrote: > > If strscpy treats the count parameter as a *guarantee* of the dest size > rather than a limit, No, it's a *limit*. And by a *limit*, I mean that we know that we can access both source and destination within that limit. > My initial patch

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Daniel Micay
On Fri, 2017-07-14 at 12:58 -0700, Linus Torvalds wrote: > On Fri, Jul 14, 2017 at 12:43 PM, Andrey Ryabinin > wrote: > > > > > yet when I look at the generated code for __ip_map_lookup, I see > > > > > >movl$32, %edx #, > > >movq%r13, %rsi # class, > > >

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Andrey Rybainin
On 07/14/2017 10:58 PM, Linus Torvalds wrote: > On Fri, Jul 14, 2017 at 12:43 PM, Andrey Ryabinin > wrote: >> >>> yet when I look at the generated code for __ip_map_lookup, I see >>> >>>movl$32, %edx #, >>>movq%r13, %rsi # class, >>>leaq48(%rax), %r

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Linus Torvalds
On Fri, Jul 14, 2017 at 12:43 PM, Andrey Ryabinin wrote: > >> yet when I look at the generated code for __ip_map_lookup, I see >> >>movl$32, %edx #, >>movq%r13, %rsi # class, >>leaq48(%rax), %rdi #, tmp126 >>callstrscpy # >> >> what's the

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Dave Jones
On Fri, Jul 14, 2017 at 12:05:02PM -0700, Linus Torvalds wrote: > On Fri, Jul 14, 2017 at 7:25 AM, Dave Jones wrote: > > On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: > > > > > > git://git.linux-nfs.org/projects/anna/linux-nfs.git > > tags/nfs-for-4.13-1 > > > > Since

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Andrey Ryabinin
On 07/14/2017 10:05 PM, Linus Torvalds wrote: > On Fri, Jul 14, 2017 at 7:25 AM, Dave Jones wrote: >> On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: >> > >> > git://git.linux-nfs.org/projects/anna/linux-nfs.git tags/nfs-for-4.13-1 >> >> Since this landed, I'm seeing this dur

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Linus Torvalds
On Fri, Jul 14, 2017 at 7:25 AM, Dave Jones wrote: > On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: > > > > git://git.linux-nfs.org/projects/anna/linux-nfs.git tags/nfs-for-4.13-1 > > Since this landed, I'm seeing this during boot.. > > ===

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread J. Bruce Fields
On Fri, Jul 14, 2017 at 10:25:43AM -0400, Dave Jones wrote: > On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: > > Hi Linus, > > > > The following changes since commit > 32c1431eea4881a6b17bd7c639315010aeefa452: > > > > Linux 4.12-rc5 (2017-06-11 16:48:20 -0700) > > > >

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Dave Jones
On Thu, Jul 13, 2017 at 05:16:24PM -0400, Anna Schumaker wrote: > Hi Linus, > > The following changes since commit 32c1431eea4881a6b17bd7c639315010aeefa452: > > Linux 4.12-rc5 (2017-06-11 16:48:20 -0700) > > are available in the git repository at: > > git://git.linux-nfs.org/projec

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Anna Schumaker
On 07/14/2017 03:09 AM, Christoph Hellwig wrote: > On Thu, Jul 13, 2017 at 02:43:14PM -0700, Linus Torvalds wrote: >> On Thu, Jul 13, 2017 at 2:16 PM, Anna Schumaker >> wrote: >>> >>> git://git.linux-nfs.org/projects/anna/linux-nfs.git tags/nfs-for-4.13-1 >> >> Btw, your key seems to have expi

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-14 Thread Christoph Hellwig
On Thu, Jul 13, 2017 at 02:43:14PM -0700, Linus Torvalds wrote: > On Thu, Jul 13, 2017 at 2:16 PM, Anna Schumaker > wrote: > > > > git://git.linux-nfs.org/projects/anna/linux-nfs.git tags/nfs-for-4.13-1 > > Btw, your key seems to have expired, and doing a refresh on it doesn't fix it. > > I'm

Re: [GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-13 Thread Linus Torvalds
On Thu, Jul 13, 2017 at 2:16 PM, Anna Schumaker wrote: > > git://git.linux-nfs.org/projects/anna/linux-nfs.git tags/nfs-for-4.13-1 Btw, your key seems to have expired, and doing a refresh on it doesn't fix it. I'm sure you've refreshed your key, but apparently that refresh hasn't been percolat

[GIT PULL] Please pull NFS client changes for Linux 4.13

2017-07-13 Thread Anna Schumaker
Hi Linus, The following changes since commit 32c1431eea4881a6b17bd7c639315010aeefa452: Linux 4.12-rc5 (2017-06-11 16:48:20 -0700) are available in the git repository at: git://git.linux-nfs.org/projects/anna/linux-nfs.git tags/nfs-for-4.13-1 for you to fetch changes up to b4f937cffa66b3d56