Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp1077520lfn; Wed, 23 Feb 2022 18:28:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpKfF9vQraUA+Lhd5hr9SlRqpo8bWSdNl7SM/dYcauGsgGtZS35LxyUlJZ+6lTMEjNs2Wx X-Received: by 2002:a17:902:b116:b0:14f:460d:bf42 with SMTP id q22-20020a170902b11600b0014f460dbf42mr757170plr.108.1645669723398; Wed, 23 Feb 2022 18:28:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645669723; cv=none; d=google.com; s=arc-20160816; b=b+VpZcsziM9G20YoEGK9fyihmdhUgCjOl8yospa8yysURGZfUaEwcdbwb4VfwZNviR gcwi/y3M9RQ+6fNkJbZ38WscJ4Y3SvGl7ErrTvj1szf40BtuOzxy2eaI4bIz5TxPIuJ/ 3OqtKZJwtK3oSb79q3i4sHOuHo8T/mW040mciHYDszEHwJhAfG8H9hBsQFL71pEQOXH5 Fsq4Mu33l/Cw5njpGLtfY0di0/bxrNrS/fRv5AxScb9bAXYXTCoASmY59viGYn+ZJxKe bjh9MrrQOj2g/8zGoaWBAGFDLv1k7LiLhFDRuLxOses3Jj3q11I6iRtrGiGk/Uo/Kb8w CV+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1jzhpJXBre7yHc86UG5PVCm8y9Mu8t3447N2sB9WANg=; b=ffcei30gTQGxNTFvbEWTqZEHS3P+10wwWLSIGM5U1hjx0RgTwlKSaj+jYQSpnlLB7q m+qJuICzt0eSWK+DAitrf5ROiQaXCueZyQGrKID8EesX2g0ZbJp/C9jhVoG5vCEaB7xm DBIhJijJ/ahaVsKNGaEefGpLKaKdEQV5qM3N08O4tXhFJYvH7V2O9jQg5zdW52owl7z+ viZTv3/BsBWuZ5bOA7Y1iWhUPeffLr3/uYI5dbG3yE8wAN5tsEyB2kGsAlG6pdoBYidN oxZu2+/OMcVuWfcXcCELr0eADFxuDO2P81yOBGspqPmQ/yleH82z5tXeopddxBwm0Uut 6uIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ToY+jX97; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u11si1362351plh.180.2022.02.23.18.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 18:28:43 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ToY+jX97; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3334A2335CD; Wed, 23 Feb 2022 18:28:40 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230085AbiBXC3F (ORCPT + 99 others); Wed, 23 Feb 2022 21:29:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230077AbiBXC3E (ORCPT ); Wed, 23 Feb 2022 21:29:04 -0500 Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF8092325E1; Wed, 23 Feb 2022 18:28:35 -0800 (PST) Received: by mail-yb1-xb34.google.com with SMTP id j2so1172240ybu.0; Wed, 23 Feb 2022 18:28:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1jzhpJXBre7yHc86UG5PVCm8y9Mu8t3447N2sB9WANg=; b=ToY+jX97i0xupoPH8/daC/7m7PKOfD7autEAGocAXYDPM0bowwaZuAcX1jfdiRN1Jk 7SOVKzALkgM1o3MjVfCdnA/ZpJ24YjoRtDjF8YPby0lNutBs1TKdzHMuVGCFHt4dc3g4 z9vRm4HUB6S+mbBTYroDFU+9bfUDI4XOCOBWB2ZSp7UJQZks3l1uFOpDkQ+IiVHZPPOd KQd/VB8LR4iu4t8rk5izmBc5tH38ZPzGn0oxNYUcC9pccMjFeufJMZtx8TW6NTEU8s8v D92MWEcvLT65xq+kDvZGM0CvzAOE6cGki6kTGKrX/pZwEjr/9Nb0j+iqOr2whpUO4WOx 1vSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1jzhpJXBre7yHc86UG5PVCm8y9Mu8t3447N2sB9WANg=; b=LL9oKRvpvSGJ+5FFT+OXacSKVJaJnOyG9aMpXhX7+cqTPSIspTemZuhADW+kPIov4z seVgZrmlpQGP700Lj3WN8R9zxmcZObP3Hrlg5BlZ6Rhb44CJvdAKvw8di+Nku/cRHFlr faOw5QRaxFG3oAgnePLZvyupNsI63xbzGsGAcbMJj2TlygdUgNK4x/sBeak5KOlKYQGw QkrE5ttm1Msomhm1xGJH5wRW84SA8Wvc2uKNCsuR+1N7YRK6LDu1QZ/MkhAavwAfsz9o VDZcdLr7KDp1c/A4CxSWsjxL8teH14ZsH8W0BTso1WxhNSEQjkJNcSmYjTwwUnhfB0WQ WCsA== X-Gm-Message-State: AOAM5305hYGZg9qft/dRuym6MO3f4IcLJLNZdiSxMjfjKXJQSk86hCDa PhV3O8rrWlXRrAOVfvkWixPGTSJIrRUfQ9KMias= X-Received: by 2002:a25:b5c4:0:b0:623:a42e:476b with SMTP id d4-20020a25b5c4000000b00623a42e476bmr587997ybg.245.1645669714940; Wed, 23 Feb 2022 18:28:34 -0800 (PST) MIME-Version: 1.0 References: <20220223231752.52241-1-ppbuk5246@gmail.com> <878ru1umcu.fsf@email.froward.int.ebiederm.org> <87h78pknm1.fsf@email.froward.int.ebiederm.org> In-Reply-To: <87h78pknm1.fsf@email.froward.int.ebiederm.org> From: Yun Levi Date: Thu, 24 Feb 2022 11:28:24 +0900 Message-ID: Subject: Re: [PATCH] fs/exec.c: Avoid a race in formats To: "Eric W. Biederman" Cc: Al Viro , Kees Cook , linux-fsdevel@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Thu, Feb 24, 2022 at 11:25 AM Eric W. Biederman wrote: > I took a quick look and unregistering in the module exit routine looks > safe, as set_binfmt takes a module reference, and so prevents the module > from being unloaded. > > If you can find a bug with existing in-kernel code that would be > interesting. Otherwise you are making up assumptions that don't current > match the code and saying the code is bugging with respect to > assumptions that do not hold. > > The code in the kernel is practical not an implementation of some > abstract that is robust for every possible use case. > > Eric Thanks and sorry for making a noise.