linux/fs/ubifs
Richard Weinberger 32fe905c17 ubifs: Fix O_TMPFILE corner case in ubifs_link()
It is perfectly fine to link a tmpfile back using linkat().
Since tmpfiles are created with a link count of 0 they appear
on the orphan list, upon re-linking the inode has to be removed
from the orphan list again.

Ralph faced a filesystem corruption in combination with overlayfs
due to this bug.

Cc: <stable@vger.kernel.org>
Cc: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Reported-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Tested-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Reported-by: Amir Goldstein <amir73il@gmail.com>
Fixes: 474b93704f ("ubifs: Implement O_TMPFILE")
Signed-off-by: Richard Weinberger <richard@nod.at>
2017-04-18 23:18:02 +02:00
..
budget.c
commit.c
compress.c
crypto.c fscrypt: constify struct fscrypt_operations 2017-02-08 10:59:57 -05:00
debug.c ubifs: Fix debug messages for an invalid filename in ubifs_dump_inode 2017-03-30 09:27:53 +02:00
debug.h
dir.c ubifs: Fix O_TMPFILE corner case in ubifs_link() 2017-04-18 23:18:02 +02:00
file.c mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf 2017-02-24 17:46:54 -08:00
find.c
gc.c ubifs: Remove some dead code 2016-12-12 23:06:28 +01:00
io.c ubifs: Use dirty_writeback_interval value for wbuf timer 2016-12-12 23:06:24 +01:00
ioctl.c ubifs: allow encryption ioctls in compat mode 2017-01-17 14:33:41 +01:00
journal.c ubifs: fix unencrypted journal write 2017-01-17 14:05:23 +01:00
Kconfig ubifs: add CONFIG_BLOCK dependency for encryption 2017-01-17 14:32:47 +01:00
key.h ubifs: Implement encrypted filenames 2016-12-12 23:07:38 +01:00
log.c
lprops.c UBIFS: improve function-level documentation 2016-10-02 22:55:02 +02:00
lpt_commit.c UBIFS: improve function-level documentation 2016-10-02 22:55:02 +02:00
lpt.c
Makefile ubifs: Add skeleton for fscrypto 2016-12-12 23:07:38 +01:00
master.c
misc.c ubifs: Add logging functions for ubifs_msg, ubifs_err and ubifs_warn 2016-03-20 21:36:05 +01:00
misc.h fs/ubifs: remove unnecessary new_valid_dev check 2015-11-06 23:26:48 +01:00
orphan.c
recovery.c UBIFS: Delete unnecessary checks before the function call "iput" 2015-11-06 23:26:52 +01:00
replay.c ubifs: Implement encrypted filenames 2016-12-12 23:07:38 +01:00
sb.c ubifs: Raise write version to 5 2016-12-12 23:07:38 +01:00
scan.c
shrinker.c
super.c fscrypt: constify struct fscrypt_operations 2017-02-08 10:59:57 -05:00
tnc_commit.c ubifs: Fix assertion in layout_in_gaps() 2016-08-23 23:02:40 +02:00
tnc_misc.c
tnc.c ubifs: Fix journal replay wrt. xattr nodes 2017-01-17 14:35:58 +01:00
ubifs-media.h ubifs: Raise write version to 5 2016-12-12 23:07:38 +01:00
ubifs.h statx: Add a system call to make enhanced file info available 2017-03-02 20:51:15 -05:00
xattr.c ubifs: Implement encrypted filenames 2016-12-12 23:07:38 +01:00