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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a5e7b80e-e1db-7b57-3b94-4d8e3a43cc6a@nod.at>
Date:   Mon, 15 May 2017 17:22:49 +0200
From:   Richard Weinberger <richard@....at>
To:     dedekind1@...il.com, linux-mtd@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, adrian.hunter@...el.com,
        stable@...r.kernel.org
Subject: Re: [PATCH] ubifs: Fix inode leak in xattr code

Artem,

Am 15.05.2017 um 16:53 schrieb Artem Bityutskiy:
> On Mon, 2017-05-15 at 16:20 +0200, Richard Weinberger wrote:
>> To solve this problem, set i_nlink for all xattr inodes to 0, such
>> that
>> the iput() in the UBIFS xattr code makes the temporary inode vanish
>> immediately.
> 
> What if there is iget right after iput? With this patch, will we need
> to go all the way to the slow media instead of just getting having the
> inode from the inode cache?

Hmm, why would we go down to the slow media?
Since the xattr was just looked up there is a high chance that the TNC
will still contain the node.
A new inode needs to be allocated, though.

Alternatively we could add a iget_locked/drop_nlink/iput sequence to
ubifs_tnc_remove_ino(). But that will make unlink() much slower for files
that contain xattrs.

Thanks,
//richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ