All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+594427aebfefeebe91c6@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [syzbot] [bcachefs?] UBSAN: shift-out-of-bounds in rewrite_old_nodes_pred
Date: Sun, 05 May 2024 18:04:46 -0700	[thread overview]
Message-ID: <000000000000ce43380617bea7d1@google.com> (raw)
In-Reply-To: <0000000000000498630617b740d3@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: [syzbot] [bcachefs?] UBSAN: shift-out-of-bounds in rewrite_old_nodes_pred
Author: lizhi.xu@windriver.com

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7367539ad4b0

diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index bf68ea49447b..1768d46980e9 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -983,7 +983,7 @@ static bool bformat_needs_redo(struct bkey_format *f)
 		if ((f->bits_per_field[i] == unpacked_bits) && field_offset)
 			return true;
 
-		if (((field_offset + ((1ULL << f->bits_per_field[i]) - 1)) &
+		if (((field_offset + (1ULL << (f->bits_per_field[i] - 1))) &
 		     unpacked_mask) <
 		    field_offset)
 			return true;

  reply	other threads:[~2024-05-06  1:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 16:14 [syzbot] [bcachefs?] UBSAN: shift-out-of-bounds in rewrite_old_nodes_pred syzbot
2024-05-06  1:04 ` syzbot [this message]
2024-05-06 11:34 ` Edward Adam Davis
2024-05-06 12:08   ` syzbot
2024-05-07 19:11 ` syzbot

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=000000000000ce43380617bea7d1@google.com \
    --to=syzbot+594427aebfefeebe91c6@syzkaller.appspotmail.com \
    --cc=linux-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.