From nobody Fri Jan 20 17:15:39 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nz5k132qsz2t3Dn for ; Fri, 20 Jan 2023 17:15:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nz5k10zkHz4G6C; Fri, 20 Jan 2023 17:15:53 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ua1-f45.google.com with SMTP id i23so1494956ual.13; Fri, 20 Jan 2023 09:15:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=sdVvVjFG2R1BSMEWXu45ZH2utqdxr+X2AGdnsWwi7Ms=; b=daFJgTpt5Dm3A1ZAYjoRLKuBYpK1lVXzNij2LpNtuMxDsAxOwJ5DQIS1Zfj4vWKUhH WaB2Em/goprz/QgDgDDga0UQ5gzJehSyrAzu0seYrUAN43yGRorOSh1h9yL4LZFYDG27 oMD5a9lJZ7rlyYG5At1ZvkeWjv33PYC0+YNw8WXCuA46MURCEjBv8D1glVd0TuYw8BYt dzoRrubHKSGOeN7mcGMq8xznIH+2B2krmifXiqJSs3zMLu0sLuRETFBFefdl1aWziaQp UZnZCGFRtbqYLwPVzW6a6xbWdAlcQVXapTxLPozQXgpjA0MN2rdiyY5/6wr3FAzGY3VZ 9HRA== X-Gm-Message-State: AFqh2kpL0h1C8QOUyOxIaEwRMZQ6IFNDyknjyYDc8APJHgUBcfDfNFA4 CD1TKLhp+LZE5fbp7NV3F8pjzqnJGjNkxFjZPA3jFtcK X-Google-Smtp-Source: AMrXdXuZGoKBjJl6uLs47GtJ4cywtVrkGXXz8Gak0s2JLTZDomag1n1DeJie+VOTao4qtxE8v/CE6dkJrvufF7+7r+k= X-Received: by 2002:ab0:31d0:0:b0:419:d115:2773 with SMTP id e16-20020ab031d0000000b00419d1152773mr1913763uan.29.1674234952237; Fri, 20 Jan 2023 09:15:52 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202301091857.309Iv87L068285@gitrepo.freebsd.org> <2f4e4ccf-b19a-4f8f-a9e0-72298e500d7c@app.fastmail.com> <20230120083721.Horde.w2KDmblCBL6A2zxfE-TrZbB@webmail.leidinger.net> In-Reply-To: <20230120083721.Horde.w2KDmblCBL6A2zxfE-TrZbB@webmail.leidinger.net> From: Alan Somers Date: Fri, 20 Jan 2023 10:15:39 -0700 Message-ID: Subject: Re: git: 2c24ad3377a6 - main - ifconfig: abort if loading a module fails other than for ENOENT To: Alexander Leidinger Cc: "Danilo G. Baio" , dev-commits-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Nz5k10zkHz4G6C X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, Jan 20, 2023 at 12:37 AM Alexander Leidinger wrote: > > Quoting Alan Somers (from Thu, 19 Jan 2023 > 10:11:38 -0700): > > > Ugh, it looks like kldload(2) is doing the privilege check before the > > file existence check. I'm not sure of the best solution: > > * Change kern_kldload to check for file existence first. This would > > ring some alarm bells among security folks, and it isn't totally easy > > to do, either. > > * Change ifconfig(8) to do an existence check of its own. This > > would be ugly. > > * Change ifconfig(8) so that it doesn't attempt to load modules when > > just listing an interface. This might be incomplete, but is probably > > worth doing anyway. > > Isn't this affecting all ifconfig operations in a _vnet_ jail, not > only listing an interface? > > Would it be sensible to revert the commit until there is a solution? > > From a quick look I have the impression it makes sense to set noload > to true in a jail (in that case ifmaybeload returns and the problem > should go away). I think this is the best idea I've heard so far. I'll prepare a change.