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]
Date:   Mon, 09 Oct 2017 13:44:24 +0100
From:   Ben Hutchings <ben@...adent.org.uk>
To:     linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC:     akpm@...ux-foundation.org, "Jaegeuk Kim" <jaegeuk@...nel.org>,
        "Tom Yan" <tom.ty89@...look.com>
Subject: [PATCH 3.16 009/192] f2fs: load inode's flag from disk

3.16.49-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Jaegeuk Kim <jaegeuk@...nel.org>

commit 93607124c5450148e592c3d18ac533b4e5f25b8b upstream.

This patch fixes missing inode flag loaded from disk, reported by Tom.

[tom@...alhost ~]$ sudo mount /dev/loop0 /mnt/
[tom@...alhost ~]$ sudo chown tom:tom /mnt/
[tom@...alhost ~]$ touch /mnt/testfile
[tom@...alhost ~]$ sudo chattr +i /mnt/testfile
[tom@...alhost ~]$ echo test > /mnt/testfile
bash: /mnt/testfile: Operation not permitted
[tom@...alhost ~]$ rm /mnt/testfile
rm: cannot remove '/mnt/testfile': Operation not permitted
[tom@...alhost ~]$ sudo umount /mnt/
[tom@...alhost ~]$ sudo mount /dev/loop0 /mnt/
[tom@...alhost ~]$ lsattr /mnt/testfile
----i-------------- /mnt/testfile
[tom@...alhost ~]$ echo test > /mnt/testfile
[tom@...alhost ~]$ rm /mnt/testfile
[tom@...alhost ~]$ sudo umount /mnt/

Reported-by: Tom Yan <tom.ty89@...look.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
[bwh: Backported to 3.16: mark_inode_dirty() is in the right place, so only
 f2fs_iget() needs to be changed]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -168,6 +168,7 @@ make_now:
 		ret = -EIO;
 		goto bad_inode;
 	}
+	f2fs_set_inode_flags(inode);
 	unlock_new_inode(inode);
 	trace_f2fs_iget(inode);
 	return inode;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ