linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Lougher <phillip@squashfs.org.uk>
To: Ubisectech Sirius <bugreport@ubisectech.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-trace-kernel <linux-trace-kernel@vger.kernel.org>
Subject: Re: UBSAN array-index-out-of-bounds in read_blocklist
Date: Mon, 8 Apr 2024 22:10:36 +0100	[thread overview]
Message-ID: <a51419a5-5685-4a6b-8467-be8d3837c519@squashfs.org.uk> (raw)
In-Reply-To: <87f5c007-b8a5-41ae-8b57-431e924c5915.bugreport@ubisectech.com>

On 08/04/2024 01:56, Ubisectech Sirius wrote:
> Hello.
> We are Ubisectech Sirius Team, the vulnerability lab of China ValiantSec. Recently, our team has discovered a issue in Linux kernel 6.8. Attached to the email were a PoC file of the issue.
Hello,

I have found the cause of the problem and fixed it.

A patch will be sent to the LKML shortly.

Thanks

Phillip

Squashfs maintainer.

> 
> Stack dump:
> ------------[ cut here ]------------
> UBSAN: array-index-out-of-bounds in fs/squashfs/file.c:256:34
> index 4294967295 is out of range for type 'meta_entry [127]'
> CPU: 1 PID: 16927 Comm: syz-executor.0 Not tainted 6.8.0 #1
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
> Call Trace:
>   <TASK>
>   __dump_stack lib/dump_stack.c:88 [inline]
>   dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106
>   ubsan_epilogue lib/ubsan.c:217 [inline]
>   __ubsan_handle_out_of_bounds+0xd5/0x130 lib/ubsan.c:347
>   fill_meta_index fs/squashfs/file.c:256 [inline]
>   read_blocklist+0x175e/0x1790 fs/squashfs/file.c:333
>   squashfs_readahead+0x14fa/0x22d0 fs/squashfs/file.c:591
>   read_pages+0x1a2/0xd70 mm/readahead.c:160
>   page_cache_ra_unbounded+0x477/0x5f0 mm/readahead.c:269
>   do_page_cache_ra mm/readahead.c:299 [inline]
>   page_cache_ra_order+0x772/0xa00 mm/readahead.c:544
>   do_sync_mmap_readahead mm/filemap.c:3153 [inline]
>   filemap_fault+0x1691/0x3390 mm/filemap.c:3245
>   __do_fault+0x108/0x490 mm/memory.c:4396
>   do_read_fault mm/memory.c:4758 [inline]
>   do_fault mm/memory.c:4888 [inline]
>   do_pte_missing mm/memory.c:3745 [inline]
>   handle_pte_fault mm/memory.c:5164 [inline]
>   __handle_mm_fault+0x340a/0x48b0 mm/memory.c:5305
>   handle_mm_fault+0x3c2/0xa40 mm/memory.c:5470
>   do_user_addr_fault+0x2ed/0x1010 arch/x86/mm/fault.c:1355
>   handle_page_fault arch/x86/mm/fault.c:1498 [inline]
>   exc_page_fault+0x99/0x180 arch/x86/mm/fault.c:1554
>   asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
> RIP: 0033:0x7f8446a28202
> Code: 48 63 c3 5b c3 0f 1f 00 f3 0f 1e fa 48 89 7c 24 f0 48 89 74 24 e8 48 89 54 24 e0 48 8b 4c 24 f0 48 8b 54 24 e8 48 8b 74 24 e0 <8b> 41 40 23 81 00 01 00 00 f3 0f 6f 06 c1 e0 06 48 01 d0 0f 11 00
> RSP: 002b:00007f8447755018 EFLAGS: 00010212
> RAX: 00007f8446a281e0 RBX: 00007f8446bcbf80 RCX: 0000000020ff0000
> RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000020ff0000
> RBP: 00007f8446af14a6 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000020ff0000 R11: 0000000020000000 R12: 0000000000000000
> R13: 000000000000000b R14: 00007f8446bcbf80 R15: 00007f8447735000
>   </TASK>
> ---[ end trace ]---
> 
> Thank you for taking the time to read this email and we look forward to working with you further.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


      reply	other threads:[~2024-04-08 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  0:56 UBSAN array-index-out-of-bounds in read_blocklist Ubisectech Sirius
2024-04-08 21:10 ` Phillip Lougher [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a51419a5-5685-4a6b-8467-be8d3837c519@squashfs.org.uk \
    --to=phillip@squashfs.org.uk \
    --cc=bugreport@ubisectech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).