Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2492692lqo; Mon, 20 May 2024 07:33:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4/KyiNCQgrpOT2wgJyIFBr59L+QVgekm931o7TVHZ65VPeTAE0KdpNIqghYAQqTf5o10gdvzQHBBhNRwhy7rSTByEkn7dE8uzaUA/Gw== X-Google-Smtp-Source: AGHT+IEbjC7Rn57BYpvB3FifsWgPPvm522TULLf+zGRsFicmCQxztSUNTAxWe6gavy0fB6yUsqgj X-Received: by 2002:a05:6a00:234c:b0:6f3:ee60:54c3 with SMTP id d2e1a72fcca58-6f4e02e747dmr34092636b3a.19.1716215630923; Mon, 20 May 2024 07:33:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716215630; cv=pass; d=google.com; s=arc-20160816; b=Fds7oDwdcPmyojvqM0TVt5mI61VZEfZo3aOJvHCfoh1wNTAxnyN8UiYCM9Ck/qAzuc +ChRsL4DC9CN2RLuXWeCZdhqMTaugapKMgPneEdurZWINtNAM0whqvkITKgTPyKD02uy g0VgUqbao0pB/t+7XJmYMNrsY/Sll1+0LOgWFYRkxiYxgAVYqnsfzVcd4isnj9u2QFqi Rdd5ORW4p8dSNyVk9GXgCOcgl9nKwZj717MBXnFdVkFE3L412baE1O/41/9s0Asa72GX /cM+myaVrRFxZH+WQlJ17yGaiDPmji3GxVTS+Shvy3aJ3GeLrXSjpHHhqa9VwxzVc1Lv R9+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=FAr6/LiuWmZI3SaNji3IUnGDPd4FTWBvIf+ASqnwHco=; fh=2kGb8YukU24amzGrtipEzTZ/n+TpZGzT1aNQ50jOHLE=; b=yEwiJnjSJ3LJU3OnwpCjtpKhyATayCLCTZ5wCdCH/36sW4mvt6wB3jS+ZL56d+OK0j 7y+TJqaXKgDlW3xQ8pFno1tmSjzZbdP8WyiMzqaU542epKEahPp3uhppba6exSqSaeHK grcEfOPW/uLAkyzV0G1QMnPpUlHHi0zYtEp93Cxc41o7R0YxXbhRLISsNzrJI9+G5ubL kkKstqPOc9bWF3OirohNCStbxb1LLa4FFQLFmwjkrrqi0N3IwsNyCogKrS/UVuekoIkH TDjUu6wLwq0RVN5j2S6id6ht/5dS9QiVs16FPdGyhDG6Hv5l/dPjBx+HzWzjq3oH3bac kuDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-183842-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183842-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b17017si22117001b3a.238.2024.05.20.07.33.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 07:33:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183842-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-183842-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183842-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 88AD42851F0 for ; Mon, 20 May 2024 14:32:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF250136E1D; Mon, 20 May 2024 14:31:16 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55A071369AA; Mon, 20 May 2024 14:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716215476; cv=none; b=fbRhdz7I8D2Y2C0bQ81sitPBfniJiNUWiOJPrvK4CGwBotXTYGoVacOMl+cTTuOa8dhrb+v+aFICglSuj1CS9WXiuMjnqWu7ITy62VqHyNp4VQOebYmicxyLMeNA60onAN0eNhmTUPXXP3Hsh37MAp4wIemAut0K1VVcn64HR3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716215476; c=relaxed/simple; bh=4xJtd34PmhuOI+B1hMUkgdy+D/Ll2BKsRhEovxdIxUw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dvP9g5QJ4PZKQr/IgDay2XLaYam+QTxgp2GZUNUaM3pJ4tStlamUwRoYnelncemF5aWbViI/sW+gYJ3pkCS7JWCCP8LhGKCjDcmVbkKdIvTkwWUCUrrK4IxB4c5RKKh9iZAS53T+E+/ZHuiRG/Udv99hyAlHVusb8atEYRo6x1g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D07BC2BD10; Mon, 20 May 2024 14:31:15 +0000 (UTC) Date: Mon, 20 May 2024 10:31:53 -0400 From: Steven Rostedt To: "Ubisectech Sirius" Cc: "linux-trace-kernel" , "linux-kernel" , "kent.overstreet" Subject: Re: UBSAN: shift-out-of-bounds in validate_sb_layout Message-ID: <20240520103153.245b0c51@gandalf.local.home> In-Reply-To: References: X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 20 May 2024 15:02:26 +0800 "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.7. Attached to the email were a PoC file of the issue. > > Stack dump: > UBSAN: shift-out-of-bounds in fs/bcachefs/super-io.c:310:18 > shift exponent 127 is too large for 32-bit type 'int' > CPU: 0 PID: 14408 Comm: syz-executor.3 Not tainted 6.7.0 #2 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 > Call Trace: > > __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_shift_out_of_bounds+0x24b/0x430 lib/ubsan.c:387 > validate_sb_layout.cold+0x1a/0x51 fs/bcachefs/super-io.c:310 > bch2_read_super+0x980/0x1000 fs/bcachefs/super-io.c:786 > bch2_fs_open+0x471/0x3890 fs/bcachefs/super.c:1922 > bch2_mount+0x538/0x13c0 fs/bcachefs/fs.c:1863 > legacy_get_tree+0x109/0x220 fs/fs_context.c:662 > vfs_get_tree+0x93/0x380 fs/super.c:1771 > do_new_mount fs/namespace.c:3337 [inline] > path_mount+0x679/0x1e40 fs/namespace.c:3664 > do_mount fs/namespace.c:3677 [inline] > __do_sys_mount fs/namespace.c:3886 [inline] > __se_sys_mount fs/namespace.c:3863 [inline] > __x64_sys_mount+0x287/0x310 fs/namespace.c:3863 > do_syscall_x64 arch/x86/entry/common.c:52 [inline] > do_syscall_64+0x43/0x120 arch/x86/entry/common.c:83 > entry_SYSCALL_64_after_hwframe+0x6f/0x77 > RIP: 0033:0x7f41e1091b3e > Code: 48 c7 c0 ff ff ff ff eb aa e8 be 0d 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 f3 0f 1e fa 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007f41e1d22e38 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 > RAX: ffffffffffffffda RBX: 0000000000005d82 RCX: 00007f41e1091b3e > RDX: 0000000020005d80 RSI: 0000000020000100 RDI: 00007f41e1d22e90 > RBP: 00007f41e1d22ed0 R08: 00007f41e1d22ed0 R09: 0000000000000080 > R10: 0000000000000080 R11: 0000000000000202 R12: 0000000020005d80 > R13: 0000000020000100 R14: 00007f41e1d22e90 R15: 0000000020005e00 > > > Thank you for taking the time to read this email and we look forward to working with you further. I'm not sure why this is getting Cc'd to linux-trace-kernel. That's for anything to do with the tracing code (trace events, tracepoints, kprobes, uprobes, function tracer etc). What part of tracing is this for? -- Steve