lkml.org 
[lkml]   [2018]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC PATCH] asm/generic: introduce if_nospec and nospec_barrier
    Al Viro wrote:
    > > > No, the concern is that an fd value >= fdt->max_fds may cause the cpu
    > > > to read arbitrary memory addresses relative to files->fdt and
    > > > userspace can observe that it got loaded.
    > >
    > > Yes. And all that might reveal is the value of files->fdt. Who cares?
    >
    > Sorry, s/files->fdt/files->fdt->fd/. Still the same question - what information
    > would that extract and how would attacker use that?

    Al, paper exploit requires second data dependent load but they only do it
    for easy demonstration.

    struct file *file = (fd < fdt->max_fds) ? fdt->fd[fd] : NULL;
    if (file && (file->f_mode & mask))
    ...

    Speculative "struct file *" can be anything.
    If ->f_mode access happens cacheline will be primed.
    If pointer is userspace address nothing will happen because of SMAP.

    Now you know that some data past fdtable looks like canonical kernel
    address.

    \
     
     \ /
      Last update: 2018-01-05 11:34    [W:3.847 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site