Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp319382rwe; Tue, 18 Apr 2023 22:44:44 -0700 (PDT) X-Google-Smtp-Source: AKy350bnwn8qnGmsbZS4xXFuJUey4vGuzfHVgaCW5JsoOqO5ROpoA9TbnSy+T+lvk9pI7YReUjks X-Received: by 2002:a17:902:c653:b0:1a1:b65c:dea7 with SMTP id s19-20020a170902c65300b001a1b65cdea7mr3194354pls.47.1681883083898; Tue, 18 Apr 2023 22:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681883083; cv=none; d=google.com; s=arc-20160816; b=wZf5GRydxA8hc6kuB8GXQclNW6uYshSsxNC/fCoLY0YDAp40S2hiLYpWUm0XIhU4wU bPK655sSw4DX1UEpcjSbeZzh6uPh59fHU3CWUucl5+5R3ulsaXC8MMZKVYKEKc4IyWw/ nrD5lplzXOvMTYf+/u+6ph6eUgLgldGJwtZpu/QZRCiZ/COl+ncJn08DEQqUPE7mRG33 ndqVLmSlEIcB3TwrPjG24VySJAq8TuVS6jn+kbPqzlbfuw9s7SEt8uGfDAUxU7nzV7XJ gWpEAOXHoyRU5xCN81ywvGIHJhJkstHMtXKtU+WpdVtVL8W1w0rbhWwavJruEFp7dOrS VrLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=B/tN8bRwblazfyrY8uiba8tnTzSo4HB+oXO1oAVkqrM=; b=NVlT8d5g87sEi9fZQHkz7i+bL6zhpNi/AFv7NHxy4wJn/juvH2KPvEGQkCCAvUmed0 cIOXMaw7icnCNFGZ5eTQppYB/vNl4rShrEkaLjpjvkYYEyzAMEzSITh51lVPHyGhgc2/ ptF1gwKUiHadzhAN2eyqiB+AFsrIWmYxG2Te+GTqTkPz690r43J1KSbq3cFGKV4D72W3 Rd5DRNNzUXczjnKqZUGGmgHHJ+PdSNh/3UYOWT0fp0eVc9QB352H3Xgb5JGFSN18ilp+ qoR09bj/P1dIaL4+qc6GkUggx/J1M0jzhJ6Xw6KKIjf6T+KeEHPJrBV36h0rYnJuR2t6 Oylg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="d+HySIK/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a17090332d000b001a6a4f3a16csi10033298plr.588.2023.04.18.22.44.31; Tue, 18 Apr 2023 22:44:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="d+HySIK/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231355AbjDSF32 (ORCPT + 99 others); Wed, 19 Apr 2023 01:29:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjDSF31 (ORCPT ); Wed, 19 Apr 2023 01:29:27 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E7344697 for ; Tue, 18 Apr 2023 22:29:26 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-52079a12451so373254a12.3 for ; Tue, 18 Apr 2023 22:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681882166; x=1684474166; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=B/tN8bRwblazfyrY8uiba8tnTzSo4HB+oXO1oAVkqrM=; b=d+HySIK/GP3om2qth7Zu89GOKCUZsz15lrX+l6gLUe5NQw/OpiwLMp2MWudW8rV63q 0OeZZAAWWiM+xxGAzJ7xENtKy6PPnL5GEft0Vqb1UgY3yIzlR4T8lOThfTTQgi3W1ekU Xpq9pNR3rkrb0h5w/CImwreeMB/NHkLvTheJk7Za4rV7kC3MmqoAGGQVRqnmTJ3zB7PG dGSGlV1lFpbocS+yo/qWsBs1tx6Jkwp8zumGNwPSjkRhU2jPbDBrKz6HCRc0M9F701Yl jbyWhV/ReQBE0jmjyPe4Hsi8Jo1lw8TSi4Vqz5Wk2ADniOgxyenDMGYxpvCiwoet9RZ+ JgcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681882166; x=1684474166; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B/tN8bRwblazfyrY8uiba8tnTzSo4HB+oXO1oAVkqrM=; b=bw1EDr3VXdB+izEAVngsI8nqrWrpzHV2zVNoJyVDj/qA+paXqQqwmGGZnfrOmEataL MCHBW4F5lfhLPtDUJW4mrJgDbLEOEUYjveTrUUlTj7MVh1hyEusHce/e2kKAis2eIFyZ z14yjZUX0V2ioG6K7mVYcT9WNMRHw+KEMubEF15I1iw0p9Q52hx06yOS8c9VIy4FGdcl WBF8o8al/OhOD2nw1zfwdt+Kw/Twf87c9aZzGDz9dNJ0+NSdDhfxdIdEslyn0e4oiI6w 5Es7q1bLiP2cxh7d0VMoc0pDpEH/kyXTtN6d3ce4VOHkiReq1bKRTxiHFP48mznTFs1Q 4YVg== X-Gm-Message-State: AAQBX9e7IGsEjw6/8HCjErbi7yUdoLT2QVKIRWgT++lmIKe/OUDWN2Nf oTXGiCsqejTDBAjfD2q1EXNnqhvlYm8ShTpHLrs= X-Received: by 2002:a17:90b:104:b0:247:e4c:d168 with SMTP id p4-20020a17090b010400b002470e4cd168mr1894363pjz.10.1681882166055; Tue, 18 Apr 2023 22:29:26 -0700 (PDT) MIME-Version: 1.0 References: <20230417165246.467723-1-zyytlz.wz@163.com> <2023041756-scoop-splendor-0e01@gregkh> In-Reply-To: <2023041756-scoop-splendor-0e01@gregkh> From: Zheng Hacker Date: Wed, 19 Apr 2023 13:29:15 +0800 Message-ID: Subject: Re: [PATCH] misc: hpilo: Fix use after free bug in ilo_remove due to race condition with ilo_open To: Greg KH Cc: Zheng Wang , matt.hsiao@hpe.com, arnd@arndb.de, linux-kernel@vger.kernel.org, 1395428693sheep@gmail.com, alex000young@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Greg KH =E4=BA=8E2023=E5=B9=B44=E6=9C=8818=E6= =97=A5=E5=91=A8=E4=BA=8C 01:43=E5=86=99=E9=81=93=EF=BC=9A > > On Tue, Apr 18, 2023 at 12:52:46AM +0800, Zheng Wang wrote: > > --- a/drivers/misc/hpilo.h > > +++ b/drivers/misc/hpilo.h > > @@ -62,6 +62,7 @@ struct ilo_hwinfo { > > spinlock_t fifo_lock; > > > > struct cdev cdev; > > + struct kref refcnt; > > You now have 2 different structures doing reference counting logic on > the same structure. That's just not ok at all, and is totally broken. > Thanks for your reply. I'll look into it and figure out effective fix. Best regards, Zheng > greg k-h