lkml.org 
[lkml]   [2020]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING in __kernel_read (2)
On Mon, Sep 28, 2020 at 11:46:48PM -0700, Eric Biggers wrote:
> > Linus asked for it. What is the call chain that we hit it with?
>
> Call Trace:
> kernel_read+0x52/0x70 fs/read_write.c:471
> kernel_read_file fs/exec.c:989 [inline]
> kernel_read_file+0x2e5/0x620 fs/exec.c:952
> kernel_read_file_from_fd+0x56/0xa0 fs/exec.c:1076
> __do_sys_finit_module+0xe6/0x190 kernel/module.c:4066
> do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
> entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> See the email from syzbot for the full details:
> https://lkml.kernel.org/linux-fsdevel/000000000000da992305b02e9a51@google.com

Passing a fs without read permissions definitively looks bogus for
the finit_module syscall. So I think all we need is an extra check
to validate the fd.

\
 
 \ /
  Last update: 2020-09-29 08:56    [W:0.310 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site