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: <b9d370b063915c09ce2b2ff6bdc643ed1796ffb4.camel@kernel.org>
Date:   Fri, 21 Oct 2022 08:41:29 -0400
From:   Jeff Layton <jlayton@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-fsdevel@...r.kernel.org, Thomas Schmitt <scdbackup@....net>,
        stable@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Jan Kara <jack@...e.cz>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] isofs: prevent file time rollover after year 2038

On Thu, 2022-10-20 at 18:00 +0200, Arnd Bergmann wrote:
> From: Thomas Schmitt <scdbackup@....net>
> 
> Change the return type of function iso_date() from int to time64_t,
> to avoid truncating to the 1902..2038 date range.
> 
> After this patch, the reported timestamps should fall into the
> range reported in the s_time_min/s_time_max fields.
> 
> Signed-off-by: Thomas Schmitt <scdbackup@....net>
> Cc: stable@...r.kernel.org
> Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800627
> Fixes: 34be4dbf87fc ("isofs: fix timestamps beyond 2027")
> Fixes: 5ad32b3acded ("isofs: Initialize filesystem timestamp ranges")
> [arnd: expand changelog text slightly]
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  fs/isofs/isofs.h | 2 +-
>  fs/isofs/util.c  | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/isofs/isofs.h b/fs/isofs/isofs.h
> index dcdc191ed183..c3473ca3f686 100644
> --- a/fs/isofs/isofs.h
> +++ b/fs/isofs/isofs.h
> @@ -106,7 +106,7 @@ static inline unsigned int isonum_733(u8 *p)
>  	/* Ignore bigendian datum due to broken mastering programs */
>  	return get_unaligned_le32(p);
>  }
> -extern int iso_date(u8 *, int);
> +extern time64_t iso_date(u8 *, int);
>  
>  struct inode;		/* To make gcc happy */
>  
> diff --git a/fs/isofs/util.c b/fs/isofs/util.c
> index e88dba721661..348af786a8a4 100644
> --- a/fs/isofs/util.c
> +++ b/fs/isofs/util.c
> @@ -16,10 +16,10 @@
>   * to GMT.  Thus  we should always be correct.
>   */
>  
> -int iso_date(u8 *p, int flag)
> +time64_t iso_date(u8 *p, int flag)
>  {
>  	int year, month, day, hour, minute, second, tz;
> -	int crtime;
> +	time64_t crtime;
>  
>  	year = p[0];
>  	month = p[1];

Reviewed-by: Jeff Layton <jlayton@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ