[bug report] fs/ntfs3: Add support /proc/fs/ntfs3/<dev>/volinfo and /proc/fs/ntfs3/<dev>/label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Konstantin Komarov,

The patch 1f60ec888102: "fs/ntfs3: Add support
/proc/fs/ntfs3/<dev>/volinfo and /proc/fs/ntfs3/<dev>/label" from May
8, 2023, leads to the following Smatch static checker warning:

	fs/ntfs3/super.c:1554 ntfs_fill_super()
	warn: proc file '"label"' is world writable

fs/ntfs3/super.c
    1547 #ifdef CONFIG_PROC_FS
    1548         /* Create /proc/fs/ntfs3/.. */
    1549         if (proc_info_root) {
    1550                 struct proc_dir_entry *e = proc_mkdir(sb->s_id, proc_info_root);
    1551                 if (e) {
    1552                         proc_create_data("volinfo", S_IFREG | S_IRUGO, e,
    1553                                          &ntfs3_volinfo_fops, sb);
--> 1554                         proc_create_data("label", S_IFREG | S_IRUGO | S_IWUGO,
                                                                               ^^^^^^^
Are labels supposed to be world writable?

    1555                                          e, &ntfs3_label_fops, sb);
    1556                         sbi->procdir = e;
    1557                 }
    1558         }

regards,
dan carpenter




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux