Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp707919lqp; Sat, 13 Apr 2024 16:34:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdAWV3L+13eunjUOVO1s5/rc2qJlQgxV/Vy5IwB7td2yZ3YwN5dExLjAxdVgu3Rl4MPZ/pFoPOvepqFl3wdhspybI/EHeob8gAuoIU9g== X-Google-Smtp-Source: AGHT+IFu8rvbuT39mYsuJvXp3QPsaIsfpM/oA/xmTAuv5SDqxydzlismlBcE04SUnO4PUp+lqDsT X-Received: by 2002:a17:90a:4b44:b0:2a2:2fd:8bd8 with SMTP id o4-20020a17090a4b4400b002a202fd8bd8mr6338895pjl.15.1713051251383; Sat, 13 Apr 2024 16:34:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713051251; cv=pass; d=google.com; s=arc-20160816; b=D+2wzeMZjlS9QI6ldNRYAVtr34W7N2zcNoLozvsdSSO1kPBOlAyZym3oCTZZbJOMlC QDPfCrQRinQL5C7Lb9GmjboxI8LuIC7aCYq3vfRZmMfzLfZOu2E4K1AWH1R9zlLJwGef i1LnNBiGEswKQEznhEow+9RCWxjoyk88liL4jWjraI8LfkmZrLt4Ch8l9mptQveLxg2O Ur80PjEIrWHIO4TtJ9fYc48xz/3sAw35BHkbNYQFQdfacmwxiHArsHVxiIm5kPzjQLtB G7J3zKODyaN0y1EjnJcQga0QFrXH3afdcUsIomZbXQMlCIoLKNzj64btRAE+zhmJN/M3 xEVQ== 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 :date:subject:cc:to:from; bh=p9TXJ1xeTx2mr6tBbHv+t4DceU9+jBC7j6n/apHw7vI=; fh=AxLrQACx/0clDIBJfZSfJcpxH4vvLDx/7bfa4LPBS8k=; b=DSaVqyTZENf05AipFxGp+2raNgWYXyyxZwJxWtsf/5s6ze+iiOgLEsXY3D+oUA5gYs FQStxR59i4GIfNOwxZjGWfYcA81MGd35nk4iRteoTVU/THEIo1j8mhEJXLmMi3Qey0ZD 2KIeM9LNGg43cjsBEzAW2wurOy09ypu6RqNw3clu9DtbGZlt8MBFR/JQky/jOijs5DRr 4Czb7b4kBiUjgIQFo+TQUZE4GoCN66m4akthmIoBRr8s0i6woBqQidpB0VNvQIkk4Gb7 qcXR07KXOetzm/eEdjzN0nOavLE4tZZRUl2hyZsReYMsk16OrimyjNBmqngVQds+llhQ BoGQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-143922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143922-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id n14-20020a17090a4e0e00b002a30910be42si7789792pjh.63.2024.04.13.16.34.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Apr 2024 16:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-143922-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143922-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 DD1B1281DE3 for ; Sat, 13 Apr 2024 23:34:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B80758234; Sat, 13 Apr 2024 23:34:04 +0000 (UTC) Received: from mail78-58.sinamail.sina.com.cn (mail78-58.sinamail.sina.com.cn [219.142.78.58]) (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 329722901 for ; Sat, 13 Apr 2024 23:33:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.58 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713051243; cv=none; b=r4gXNWtEGkffp3fP+0/uZMWPLffhv+rlMRZJlbafnD2n73W01rht9efOM7+GKiTwVPGS1MXs2OIUq+qmO1eBW73YT6DmBQqVspzlglXpdlgIJRNnawx46NFuB0GFqir8XPLhpWSLunUqSp33tk2h/kVwR8/YVmfJcawt3DmZgDE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713051243; c=relaxed/simple; bh=cAq51Bpq8Z2tEYjjWfeds21jtyJJKWO6ZOv5wrPzmvU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RzEgp3Ch0glhehJ4janqBW9qYDdfZrsvwAzaY2KSFgD0yEVovemDa7CMIyM14tKWe5CUPSbqH8oCYjiP3lCgmFd2sD7fnbitl2dEN04CuYaXDxu5QJJyrHOWzKEzoo3oMSOjtU7Irz9sGdzQc6xJSwTUe0WuebeQ47nuBVb+iKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=219.142.78.58 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.118.67.190]) by sina.com (172.16.235.25) with ESMTP id 661B165A00002DB9; Sat, 14 Apr 2024 07:33:48 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 73547734210394 X-SMAIL-UIID: 67EEC6A3EB374B7F8C2B12BB7AF09238-20240414-073348-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [mm?] KASAN: slab-use-after-free Read in __vma_reservation_common Date: Sun, 14 Apr 2024 07:33:41 +0800 Message-Id: <20240413233341.1957-1-hdanton@sina.com> In-Reply-To: <000000000000ae5d410615fea3bf@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Sat, 13 Apr 2024 11:34:32 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 9ed46da14b9b Add linux-next specific files for 20240412 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=12bd4457180000 > kernel config: https://syzkaller.appspot.com/x/.config?x=7ea0abc478c49859 > dashboard link: https://syzkaller.appspot.com/bug?extid=ad1b592fc4483655438b > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1370ea67180000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 9ed46da14b9b --- x/mm/mmap.c +++ y/mm/mmap.c @@ -2657,8 +2657,6 @@ do_vmi_align_munmap(struct vma_iterator /* Point of no return */ mm->locked_vm -= locked_vm; mm->map_count -= count; - if (unlock) - mmap_write_downgrade(mm); prev = vma_iter_prev_range(vmi); next = vma_next(vmi); @@ -2677,7 +2675,7 @@ do_vmi_align_munmap(struct vma_iterator remove_mt(mm, &mas_detach); validate_mm(mm); if (unlock) - mmap_read_unlock(mm); + mmap_write_unlock(mm); __mt_destroy(&mt_detach); return 0; --