Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3292959pxj; Mon, 24 May 2021 03:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1IzgZYNgFgkXr0/LJIMYMN8PsSHmHr5Yf0wAaJuibId/30dFiY0mww9Rou82ClGPN7URn X-Received: by 2002:a50:9f05:: with SMTP id b5mr25236811edf.24.1621851749153; Mon, 24 May 2021 03:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621851749; cv=none; d=google.com; s=arc-20160816; b=So3PefxmR5P612R5fs1Wgg5aXlj+2b+KZC8Gkb5nagdazpxpwn7vC9q+R5RPpXOIPS f/mC8s3TXMF8A3MHvL+CccduU1mK1P033h52omO8JnOiG+D6bdwgbXvRcs/WmCGGBvBa 3+A6EJWY0/D/XMQjYP1+xm5Dwv2tEcCawW80wDkLEjRSK3eSRnY1tyWCLH70M0Eh4V85 B+iLU5KoYUYjeWT9uEnaHVm7V4yrfBJ2/X3diQo/X60DgYIKV+U1i9FjQofVJG+lkel7 hE0fS3bshPGms35jhVbjoVMCFujQOksmBquZmDfrorhdpjKwIR1BIYdv6JhysrSv2EFk FUHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=VnjZn5/nKzc6q673Td0aqLSIzRDB2omX+z2Bmi3TRsc=; b=anhhzZAesbkFFT2KpmF+WpDZvrqc3ljkdo/ZsxH4v9b+CPcmGmQHnsw56wNonC9NP9 mPcg0yNju0vWXa30BScQ0SrszKzMHtjdsJsoKWdekdYeLN+cHRoBnKtz+45z/y5Xs5Ro Krlq+QLd70EyJ3+xw89fB5STIDUjkzLtp6OZoa+PlYeno1h/AFeIa+Su1XwHRkedpn0o soZjslAeZuLm9zoq2TI4kQdxwMjbr1sKel9Lmb7OOiQw+CktsWDE0/+44wWp/fhQ6TgE npgb4zKG75tjIRcGKKCchMAfLASbh5MwdALuP2HMy0qFKOOsJ2vQ66LLaHRY5Q1J/1va 7APg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="GHGFlMc/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id va16si12643417ejb.325.2021.05.24.03.22.06; Mon, 24 May 2021 03:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="GHGFlMc/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232519AbhEXKUd (ORCPT + 99 others); Mon, 24 May 2021 06:20:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232511AbhEXKUc (ORCPT ); Mon, 24 May 2021 06:20:32 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D0B3C061574; Mon, 24 May 2021 03:19:04 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id f20-20020a05600c4e94b0290181f6edda88so4223084wmq.2; Mon, 24 May 2021 03:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=VnjZn5/nKzc6q673Td0aqLSIzRDB2omX+z2Bmi3TRsc=; b=GHGFlMc/JUXf4L0zKi1D4G7C0Ipa7Hpofg4xWnxA5FYX2niIXoD1+45dQ8n9Igb93G luyZOhsvf5U/Tj1MtZNWLJZ5BVabjEJ/rLPlpzxp0fcJBnQDso6xnt4AOSXq0lrmCD5T oiBfYAiM8bmdUp9n/ZNwiAdS+zAWa+FjFfeI6Gp5YQ/9m48VIhduy6lIdHG1oiTbp3P5 27Yp/ZY3/asOWLk6VVY8s2TAWGIegtIruHoEixGArt6psyF6fc8Pw+1iGDlZj6ZS/PjC Vmm7Rc3tWUfU2ARLtHHJbLx5Bh0oFPUrfbv2CyEdIWeMJK8wbLZmwGOlYWkHbQaSDIBX 06Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VnjZn5/nKzc6q673Td0aqLSIzRDB2omX+z2Bmi3TRsc=; b=gU1n8fiA2F/2mmedNME6wiyyZSeJguhv5qBGTSlpOURYVuA6ovmUDRP89CRXwiJNIK DOyUthISeFaQL0BiQV/GGWYuqnFar8soUz3ZUY4/QA1FvkpvKksaBNlyAxSmbc7RKUXm ltsRRvdnI2zPMiCVTNr4Mj+FdWikH/7XwzH4pUul/8gliPvN9fQglRgvxj2EgZVy0Eqz /5VZs+U2+b8z3BBcG+7F0XN0Gn+bm1x/0/ro5LhLqTtgxu3wolTApoxpx6qkxASIJWTM Q9XIlg8Dr3Ui8PkLC0nvOXilrp402yhh1ANSC/5eSwInofmYM09APmjs8vp4SEQDUMqG fIEQ== X-Gm-Message-State: AOAM530Q2KUbgVZ6xJ6ihUGSDstXhQsDLKtBEz4A97bbKppeuSm0DlB2 /2p//737UzgFOy5gKpcyGbBpPSps4d+CDr/j X-Received: by 2002:a1c:14e:: with SMTP id 75mr2135146wmb.89.1621851542400; Mon, 24 May 2021 03:19:02 -0700 (PDT) Received: from ?IPv6:2620:10d:c096:310::2090? ([2620:10d:c093:600::2:2b02]) by smtp.gmail.com with ESMTPSA id x2sm7248430wmj.3.2021.05.24.03.19.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 May 2021 03:19:02 -0700 (PDT) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW1BBVENIXSBpby13cTogRml4IFVBRiB3aGVuIHdh?= =?UTF-8?Q?keup_wqe_in_hash_waitqueue?= To: "Zhang, Qiang" , Hillf Danton , "axboe@kernel.dk" Cc: "syzbot+6cb11ade52aa17095297@syzkaller.appspotmail.com" , "io-uring@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20210524071844.24085-1-qiang.zhang@windriver.com> <20210524082536.2032-1-hdanton@sina.com> From: Pavel Begunkov Message-ID: <900206b7-cf22-8248-1130-89c8f9d5539b@gmail.com> Date: Mon, 24 May 2021 11:18:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/24/21 10:19 AM, Zhang, Qiang wrote: > On Mon, 24 May 2021 15:18:44 +0800 >> From: Zqiang >> >> The syzbot report a UAF when iou-wrk accessing wqe of the hash >> waitqueue. in the case of sharing a hash waitqueue between two >> io-wq, when one of the io-wq is destroyed, all iou-wrk in this >> io-wq are awakened, all wqe belonging to this io-wq are removed >> from hash waitqueue, after that, all iou-wrk belonging to this >> io-wq begin running, suppose following scenarios, wqe[0] and wqe[1] >> belong to this io-wq, and these work has same hash value. Zhang, btw check your mail encoding, should some plain unicode -- Pavel Begunkov