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: <20181116143314.qn7jmtyz4ad4bax6@debian>
Date:   Fri, 16 Nov 2018 14:33:14 +0000
From:   Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:     Jan Kara <jack@...e.cz>
Cc:     Jan Kara <jack@...e.com>, linux-kernel@...r.kernel.org,
        Andrew Gabbasov <andrew_gabbasov@...tor.com>
Subject: Re: [PATCH] udf: fix dvd mounting error

On Fri, Nov 16, 2018 at 01:56:33PM +0100, Jan Kara wrote:
> On Thu 15-11-18 12:26:00, Sudip Mukherjee wrote:
> > Some DVDs are failing to mount with the error:
> > 
> > [  632.305370] UDF-fs: warning (device loop0): udf_load_vrs: No anchor found
> > [  632.305372] UDF-fs: Scanning with blocksize 512 failed
> > [  632.307837] UDF-fs: warning (device loop0): udf_load_vrs: No anchor found
> > [  632.307839] UDF-fs: Scanning with blocksize 1024 failed
> > [  632.309320] UDF-fs: incorrect dstring lengths (32/32)
> > [  632.309361] UDF-fs: Scanning with blocksize 2048 failed
> > [  632.309530] UDF-fs: warning (device loop0): udf_load_vrs: No VRS found
> > [  632.309531] UDF-fs: Scanning with blocksize 4096 failed
> > 
> > This particular DVD used to work with v4.4 kernels, and has stopped
> > working after updating the kernel to v4.14. Did a git bisect and that
> > pointed to:
> > c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8")

<snip>

> From e1a7680b960fe25821f2419b4c0b1215f8ab2f9b Mon Sep 17 00:00:00 2001
> From: Jan Kara <jack@...e.cz>
> Date: Fri, 16 Nov 2018 13:43:17 +0100
> Subject: [PATCH] udf: Allow mounting volumes with incorrect identification
>  strings
> 
> Commit c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8")
> started to be more strict when checking whether converted strings are
> properly formatted. Sudip reports that there are DVDs where the volume
> identification string is actually too long - UDF reports:
> 
> [  632.309320] UDF-fs: incorrect dstring lengths (32/32)
> 
> during mount and fails the mount. This is mostly harmless failure as we
> don't need volume identification (and even less volume set
> identification) for anything. So just truncate the volume identification
> string if it is too long and replace it with 'Invalid' if we just cannot
> convert it for other reasons. This keeps slightly incorrect media still
> mountable.
> 
> CC: stable@...r.kernel.org
> Fixes: c26f6c615788 ("udf: Fix conversion of 'dstring' fields to UTF8")
> Reported-by: Sudip Mukherjee <sudipm.mukherjee@...il.com>
> Signed-off-by: Jan Kara <jack@...e.cz>
> ---

It works perfectly. Thanks.

Tested-by: Sudip Mukherjee <sudipm.mukherjee@...il.com>

>  fs/udf/super.c   | 16 ++++++++++------
>  fs/udf/unicode.c | 14 +++++++++++---
>  2 files changed, 21 insertions(+), 9 deletions(-)
> 

<snip>

> -	if (ret < 0)
> -		goto out_bh;
> -
> -	strncpy(UDF_SB(sb)->s_volume_ident, outstr, ret);
> +	if (ret < 0) {
> +		strcpy(UDF_SB(sb)->s_volume_ident, "Invalid");

Just a suggestion. Even on failed cases, having the volume identification
as "Invalid" might confuse the users. Since you have a maximum limit as 31
maybe something more meaningful like "No Name" ?

--
Regards
Sudip

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ