From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id kJgEMvhw02ZCGgAA62LTzQ:P1 (envelope-from ) for ; Sat, 31 Aug 2024 19:37:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id kJgEMvhw02ZCGgAA62LTzQ (envelope-from ) for ; Sat, 31 Aug 2024 21:37:28 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="jIRmp/ox"; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BLHZ0gBw; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1725133048; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IwdmXyMQ/47or/QVetrxEJxOCIrZsewIZv1ri6n0qtA=; b=uhd5tU5KAcGoCSD4ZP+hi9uVn38kcHunRA5wBWdZ98wIXtrRu7NycMijOmQE5NJD9gRIt2 qb/4HrKlLrVy9xCGIs9h90prP45+ZwAPJqRnGPdbRscgoYeNiDKEKmqprV21CJwX2mY+PS exS3bbacglhj9w+oY1k4nxEbijdq+mX3Z5fBDjcqaJbAVNkwBrenMx9jvvTyymYtUxTe9b D1Mv7fVaMck/3VoK5u12IpPmONPJa73oT+PRAWnvodEe8+N92SNRc3GVNID8FzdCtUfQL2 ct7iwtj/T/LZzrjwUVyf72dXHQ9eNGi6hhGVJR8Iot0NX0hPw3f+Afjosb8h+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="jIRmp/ox"; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BLHZ0gBw; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1725133048; a=rsa-sha256; cv=none; b=hUKrAC0b6uWDmDM8kX9vSkzOJpAARdKiYn/KVPtIqypWx6mrLkTVR4lDBtBeMu8Z/W+Nbg hm6HjpaAr+3rqiYRnKd9zxK7CD3s+g3AV6eoc9uUHgF3QY+Vywq2TKepb3DDuBFldR/LRb r+hHkD1GGpaWs6WnHCR88U92UUAe3RHXRCWotXe6RcFegqBeiOab1BSiqmRCA5N9fbccIn cEZ8tsDNAPHqCneROblBJxwfCpab8ofOfUK4hx9zfouvWVIeVxusz35/B11GEczV95b0K1 sUTtO0Yn9LuaV2tx5/XB+Q6N/+46fCdC3Fb37C2CB1uc6Tol2FiuOYZQsL8XVQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 650F86BCAC for ; Sat, 31 Aug 2024 21:37:27 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skTuD-00078m-5S; Sat, 31 Aug 2024 15:37:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skTuC-00078V-5R for bug-guix@gnu.org; Sat, 31 Aug 2024 15:37:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1skTuB-0000hB-Sb for bug-guix@gnu.org; Sat, 31 Aug 2024 15:37:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=IwdmXyMQ/47or/QVetrxEJxOCIrZsewIZv1ri6n0qtA=; b=jIRmp/ox3C4VA2DC9B65lATqZBpaLaUdrN0klgsZXX3RUx2R820BHWL/CSCxeBzFfpPxfNW+Z6qBJJ3EuH9FryE2PDKW9cIuRA4AjhrPyag6Eq7qfIbU0pjcQgNILi9GGSsBB8Xem77HXAMgaW37h94uusRv+iKNHncjGs0Aw25T+shP/tG2LS3Jwp4d5VsVh/nAlF1u3KpSDPsWXCXHIW0JWnJGU+qJZjecMwJw3tsM/DWBjqbbqxEHVPKzUyhB0cbfrG4yjTQUWR7f5Kj7+oZeyO9BI47pd2zD83KMq+Z+X8reLMqJRglzuveZtp/NsxNrNsMnQ+vy3MZmCpG+qA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1skTv8-0001pR-43 for bug-guix@gnu.org; Sat, 31 Aug 2024 15:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#72828: libcamera module signatures Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 31 Aug 2024 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72828 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andrew Tropin Cc: 72828@debbugs.gnu.org Received: via spool by 72828-submit@debbugs.gnu.org id=B72828.17251330797021 (code B ref 72828); Sat, 31 Aug 2024 19:38:02 +0000 Received: (at 72828) by debbugs.gnu.org; 31 Aug 2024 19:37:59 +0000 Received: from localhost ([127.0.0.1]:56607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skTv5-0001pA-7d for submit@debbugs.gnu.org; Sat, 31 Aug 2024 15:37:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1skTv2-0001ou-RO for 72828@debbugs.gnu.org; Sat, 31 Aug 2024 15:37:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skTu0-0000gV-GV; Sat, 31 Aug 2024 15:36:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=IwdmXyMQ/47or/QVetrxEJxOCIrZsewIZv1ri6n0qtA=; b=BLHZ0gBwiYsMpj9gmtTm +a37SPLymQT/aMtI/G2RFFupSCkrIOhzobK3qPJ0oD74hmOXJDOhuOS9oYIA5Bq4YGqKwJtmMDGVz UfSSTrZDkFYT38/0cE6+NlzFXzEsYOlWKfNS4wkA2Oqc9e4vc+CRC4lxtVVMyQhFFOfvKHSaVKDH4 uf+vee0BdEb8mmX3p+yBWDxvl6wsGmWvpBMuTQY5bK+njgGx1Aq+boMrLckrrIuUHX9Ik28AZiy8d +Ol2j0WEEDYAXaleSK3PODmb10QEOiir77ZXX3OVD87Kde5c9X71St8qw0KAhi6WWYr0ZppCMXZhD W8UejF0hC/t5ew==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87h6b6b5v3.fsf@trop.in> (Andrew Tropin's message of "Tue, 27 Aug 2024 14:46:40 +0400") References: <87h6b6b5v3.fsf@trop.in> Date: Sat, 31 Aug 2024 21:36:49 +0200 Message-ID: <87r0a4fpri.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -9.08 X-Migadu-Queue-Id: 650F86BCAC X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.08 X-TUID: Is2iYDwqEYK/ Hi Andrew, Andrew Tropin skribis: > For the last a few days I was updating and fixing libcamera package. > > The last problem I faced with it is invalid signatures: > > [0:44:16.200646504] [17247] DEBUG IPAManager ipa_manager.cpp:316 IPA modu= le /gnu/store/pfh7adzzy8akkqsjj4wlnmvmbzmrfbvk-libcamera-0.3.1/lib/libcamer= a/ipa_soft_simple.so signature is not valid I was curious about those signatures so I browsed =E2=80=98ipa_module.cpp= =E2=80=99 and =E2=80=98ipa_manager.cpp=E2=80=99. I wondered: what is that supposed to pr= otect against in the first place? Bogus LD_LIBRARY_PATH that leads users to load third-party code instead of the intended module? Apparently those loadable modules can be isolated in separate processes when they lack a valid signature, or when LIBCAMERA_IPA_FORCE_ISOLATION is set. =E2=80=98ipa_manager.cpp=E2=80=99 sheds some light on the rational= e for so much sophistication: * Module isolation is based on the module licence. Open-source modules are * loaded without isolation, while closed-source module are forcefully isol= ated. * The isolation mechanism ensures that no code from a closed-source module= is * ever run in the libcamera process. This probably makes sense in the context that the copyright owner, Google, envisioned: presumably Android programs loading random proprietary modules coming from the app store. But I wonder what the point is in the context of a free GNU/Linux distro. In Meson there=E2=80=99s an =E2=80=98ipa_sign_module=E2=80=99 boolean varia= ble and =E2=80=98src/meson.build=E2=80=99 says this: --8<---------------cut here---------------start------------->8--- if openssl.found() ipa_priv_key =3D custom_target('ipa-priv-key', output : ['ipa-priv-key.pem'], command : [gen_ipa_priv_key, '@OUTPUT@']) config_h.set('HAVE_IPA_PUBKEY', 1) ipa_sign_module =3D true else warning('openssl not found, all IPA modules will be isolated') ipa_sign_module =3D false endif --8<---------------cut here---------------end--------------->8--- Perhaps we should try removing =E2=80=98openssl=E2=80=99 from the inputs an= d thus have all the modules isolated? Ludo=E2=80=99.