mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmlEKB4ACgkQnJ2qBz9k QNkY9gf6Av2Dz1zJiPdICxLBWxFYIWmw+tqzV9ZjpKkSV8K0jJ2wqfoqbh2LZ8AN Lh0uUMw8wvxQYtnEcvrKHVwd6zjng2GtzIi8nO6IxeBOQTwyuxxGvj6YfKxD9ffg AgpJ1oPmJz6/UiBeRGX/IobXkh3ZHHbP8M094RLjoHUekbzz0bIMTBpkXXZK04Bs iysFptvASPQ14D/bXou5HwP/egET+VprCgyGfQzsyQELK+Cijt9P07aVk7mdMyv2 E45atP97TjtgJE018WMKL6LpO8j2mma7a2K/CosL9MslucuLfL8+QX+i2ZVhyuNo akchA3L1ugAfkxUDRVMrbim/rDBAGA== =tktL -----END PGP SIGNATURE----- Merge tag 'fsnotify_for_v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify fixes from Jan Kara: "Two fsnotify fixes. The fix from Ahelenia makes sure we generate event when modifying inode flags, the fix from Amir disables sending of events from device inodes to their parent directory as it could concievably create a usable side channel attack in case of some devices and so far we aren't aware of anybody depending on the functionality" * tag 'fsnotify_for_v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fs: send fsnotify_xattr()/IN_ATTRIB from vfs_fileattr_set()/chattr(1) fsnotify: do not generate ACCESS/MODIFY events on child for special files
This commit is contained in:
commit
9a903e6d96
@ -2,6 +2,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/security.h>
|
||||
#include <linux/fscrypt.h>
|
||||
#include <linux/fsnotify.h>
|
||||
#include <linux/fileattr.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/syscalls.h>
|
||||
@ -298,6 +299,7 @@ int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
err = inode->i_op->fileattr_set(idmap, dentry, fa);
|
||||
if (err)
|
||||
goto out;
|
||||
fsnotify_xattr(dentry);
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
@ -270,8 +270,15 @@ int __fsnotify_parent(struct dentry *dentry, __u32 mask, const void *data,
|
||||
/*
|
||||
* Include parent/name in notification either if some notification
|
||||
* groups require parent info or the parent is interested in this event.
|
||||
* The parent interest in ACCESS/MODIFY events does not apply to special
|
||||
* files, where read/write are not on the filesystem of the parent and
|
||||
* events can provide an undesirable side-channel for information
|
||||
* exfiltration.
|
||||
*/
|
||||
parent_interested = mask & p_mask & ALL_FSNOTIFY_EVENTS;
|
||||
parent_interested = mask & p_mask & ALL_FSNOTIFY_EVENTS &&
|
||||
!(data_type == FSNOTIFY_EVENT_PATH &&
|
||||
d_is_special(dentry) &&
|
||||
(mask & (FS_ACCESS | FS_MODIFY)));
|
||||
if (parent_needed || parent_interested) {
|
||||
/* When notifying parent, child should be passed as data */
|
||||
WARN_ON_ONCE(inode != fsnotify_data_inode(data, data_type));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user