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] [day] [month] [year] [list]
Date:   Tue, 9 Nov 2021 12:00:25 +0100
From:   Jan Kara <jack@...e.cz>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Jan Kara <jack@...e.cz>, Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-fsdevel@...r.kernel.org,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-next: Tree for Nov 9

On Tue 09-11-21 10:58:01, Geert Uytterhoeven wrote:
> 	Hi Jan,
> 
> As lore doesn't seem to have the original patch, I'm replying here.
> 
> On Tue, 9 Nov 2021, Stephen Rothwell wrote:
> > Merging ext3/for_next (39a464de961f udf: Fix crash after seekdir)
> 
> noreply@...erman.id.au reported for m68k/allmodconfig:
> fs/udf/dir.c:78:18: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
> fs/udf/dir.c:211:23: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> 
> The actual code does:
> 
>         * Did our position change since last readdir (likely lseek was
>         * called)? We need to verify the position correctly points at the
>         * beginning of some dir entry so that the directory parsing code does
>         * not get confused. Since UDF does not have any reliable way of
>         * identifying beginning of dir entry (names are under user control),
>         * we need to scan the directory from the beginning.
>         */
>        if (ctx->pos != (loff_t)file->private_data) {
>                emit_pos = nf_pos;
>                nf_pos = 0;
>        }
> 
> and:
> 
>        /* Store position where we've ended */
>        file->private_data = (void *)ctx->pos;
> 
> Obviously this is not going to fly on 32-bit systems, as
> file->private_data is 32-bit or 64-bit unsigned long, but ctx->pos is
> always 64-bit loff_t.
> 
> I do not know if UDF supports files larger than 4 GiB (DVDs can be
> larger).
> If it doesn't, you need intermediate casts to uintptr_t.
> If it does, you need a different solution.

Yeah, thanks for the heads up. I've noticed the warning from 0-day as well
and realized this is a real problem on 32-bit systems. UDF does support
dirs larger than 4G in principle (although practically anything larger than
say 1MB is probably unusable due to linear directory structure :). Anyway,
I'm working on a fix.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ