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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Feb 2020 19:32:20 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     Jens Axboe <axboe@...nel.dk>, LKML <linux-kernel@...r.kernel.org>,
        io-uring@...r.kernel.org
Subject: io_uring: io_grab_files() misses taking files->count?

Hi, Jens,

in io_grab_files() we take pointer to current->files without taking files->count.
Later, this files become attached to worker in io_worker_handle_work() also without
any manipulation with counter.

But files->count is used for different optimizations. Say, in expand_fdtable() we
avoid synchonize_rcu() in case of there is only files user. In case of there are
more users, missing of synchronize_rcu() is not safe.

Is this correct? Or maybe there is some hidden logic in io_uring, which prevents
this problem? Say, IORING_OP_OPENAT/CLOSE/ETC can't be propagated to worker etc...

Kirill

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ