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: <d727d2c860f28c5c1206b4ec2be058b87d787e4f.camel@kernel.org>
Date:   Wed, 18 Oct 2023 07:55:04 -0400
From:   Jeff Layton <jlayton@...nel.org>
To:     Klara Modin <klarasmodin@...il.com>
Cc:     OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
        Christian Brauner <brauner@...nel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] fat: fix mtime handing in __fat_write_inode

Many thanks for the bug report and testing! Do you mind if we add your
Tested-by: for this patch?

Thanks!
Jeff

On Wed, 2023-10-18 at 13:44 +0200, Klara Modin wrote:
> I can confirm that this patch fixes the issue, thanks!
>
> Den ons 18 okt. 2023 kl 13:15 skrev Jeff Layton <jlayton@...nel.org>:
> > 
> > Klara reported seeing mangled mtimes when dealing with FAT. Fix the
> > braino in the FAT conversion to the new timestamp accessors.
> > 
> > Fixes: e57260ae3226 (fat: convert to new timestamp accessors)
> > Reported-by: Klara Modin <klarasmodin@...il.com>
> > Signed-off-by: Jeff Layton <jlayton@...nel.org>
> > ---
> > This patch fixes the bug that Klara reported late yesterday. The issue
> > is a bad by-hand conversion of __fat_write_inode to the new timestamp
> > accessor functions.
> > 
> > Christian, this patch should probably be squashed into e57260ae3226.
> > 
> > Thanks!
> > Jeff
> > ---
> >  fs/fat/inode.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/fat/inode.c b/fs/fat/inode.c
> > index aa87f323fd44..1fac3dabf130 100644
> > --- a/fs/fat/inode.c
> > +++ b/fs/fat/inode.c
> > @@ -888,9 +888,9 @@ static int __fat_write_inode(struct inode *inode, int wait)
> >                 raw_entry->size = cpu_to_le32(inode->i_size);
> >         raw_entry->attr = fat_make_attrs(inode);
> >         fat_set_start(raw_entry, MSDOS_I(inode)->i_logstart);
> > +       mtime = inode_get_mtime(inode);
> >         fat_time_unix2fat(sbi, &mtime, &raw_entry->time,
> >                           &raw_entry->date, NULL);
> > -       inode_set_mtime_to_ts(inode, mtime);
> >         if (sbi->options.isvfat) {
> >                 struct timespec64 ts = inode_get_atime(inode);
> >                 __le16 atime;
> > 
> > ---
> > base-commit: fea0e8fc7829dc85f82c8a1a8249630f6fb85553
> > change-id: 20231018-amtime-24d2effcc9a9
> > 
> > Best regards,
> > --
> > Jeff Layton <jlayton@...nel.org>
> > 

-- 
Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ