From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC102C08DC for ; Fri, 17 Apr 2026 16:21:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776442882; cv=none; b=Y3hr6c8Wkpq0qD0/iy6m70AQ4uRJqs1mCI1STu+OdqBC6QpC0ElxJfHEtEaFV94BWOn1jc99jdS5JO0xFDJTR53Og1bE+Nqj5OCJ4e9ERNY2PZW1NpYtoNCSN8OwB/sCApv/bIjLf9S8P5ca5xF2ZoPa2enBNnqVgP2rNlXN+YA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776442882; c=relaxed/simple; bh=dvT47zne2lDNreAqkGgYnhB5s8KgwnRS37M0rjQfQ9Y=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:Cc: Content-Type; b=Sqi61+bo4z1GtvVnbhj+tVfWkRPvim+IybdPwVqtAm33+F7t5pWJ9hV6jUOZ+AP9K168+ltkfec2myS9DcPbWmimzU9qagYQ15+xZjJSQGQsIHtHNO9kLCo6RESlCleNsIQOk5eJywLQOn99MHUXpk3PTGyoD2tyhC3QHf7tV1c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-68478472f7eso1655811eaf.3 for ; Fri, 17 Apr 2026 09:21:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776442880; x=1777047680; h=cc:to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OCpwp3dyw5HCSh0HFcEi8D8onoa73uC6RLK5/1FzMkY=; b=Eh3NsSOoLK5EpmitiBRG5S5oHfQdwZZh64yNwhrfAtmfTB1efbCjBjYlKf6IB3qgHa IShB1GfkKN7ryidRDOoV2uMgSgFS8SsdVow9gzTE5KrzOKnk68TIsd8BEUttO257HoxE YQupZfxVaTpcSc/flzJyA4DE7wRCBDeSBC7rEt0R+H+6W1BJYXfxP5rPvXlqNz2SjUzh kiiuZhSE3SDSEcfAIneS2JlG/LXhGyEU5bkR+1+OFdCY9eQVgPjl/7p98QwAjzzaUfHx NxzmVS3Dp9mB0Nv9XaHiE+t2DWDL9RHstXMUHB6CSfBvMF6HDkyPYCskfWvrYFdM5tZK Quig== X-Forwarded-Encrypted: i=1; AFNElJ8DCnoJ83lztkL7I5GcSsgMKjPRYCaNOx8tbBDeN47fXHx7ohflWS6HgcOPv0utDNqNUVYCXccYktPOcg0=@vger.kernel.org X-Gm-Message-State: AOJu0YzDAXWZyEmmu+QuOuT+Zrxu0gSVdCtQAYmHGcobfnZT3ovOAxtx WQs2w3lfuC/R04PPRkZOSzmM4S4p05JKf3eCcuNhOaDxprT5oSzE9c3axaValWRSgelsjku7Kqv IdWLU3JZUVxRT0LQ4xPSWzciWpSXfZTVmcoMCUnDZ/gaBKdPrYzCcF4lKQ8E= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:55d2:10b0:68c:2ff9:522c with SMTP id 006d021491bc7-69462e2e252mr1320307eaf.2.1776442880660; Fri, 17 Apr 2026 09:21:20 -0700 (PDT) Date: Fri, 17 Apr 2026 09:21:20 -0700 In-Reply-To: <177644287830.3790093.7729454483587611807@talencesecurity.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69e25e00.050a0220.1de265.002c.GAE@google.com> Subject: Re: [syzbot] kernel BUG in __ocfs2_page_mkwrite From: syzbot To: tristmd@gmail.com Cc: tristmd@gmail.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" > #syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master This crash does not have a reproducer. I cannot test it. >>>From c2c3a03773b08b55240f1a32b79b20b57bb88076 Mon Sep 17 00:00:00 2001 > From: Tristan Madani > Date: Fri, 17 Apr 2026 16:15:19 +0000 > Subject: [PATCH] ocfs2: replace BUG_ON with error return in > __ocfs2_page_mkwrite() > __ocfs2_page_mkwrite() uses BUG_ON(err != len) after > ocfs2_write_end_nolock(). On corrupted filesystems, a short > write triggers a kernel panic. Replace with proper error > handling that returns VM_FAULT_SIGBUS to userspace. > Reported-by: syzbot+ea5aff81e35d189b9335@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=ea5aff81e35d189b9335 > Signed-off-by: Tristan Madani > --- > fs/ocfs2/mmap.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c > index 6c57015..d999d88 100644 > --- a/fs/ocfs2/mmap.c > +++ b/fs/ocfs2/mmap.c > @@ -103,7 +103,12 @@ static vm_fault_t __ocfs2_page_mkwrite(struct file *file, > goto out; > } > err = ocfs2_write_end_nolock(mapping, pos, len, len, fsdata); > - BUG_ON(err != len); > + if (unlikely(err != len)) { > + if (err >= 0) > + err = -EIO; > + ret = vmf_error(err); > + goto out; > + } > ret = VM_FAULT_LOCKED; > out: > return ret; > -- > 2.47.3