Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACE12C3DA41 for ; Thu, 11 Jul 2024 01:39:27 +0000 (UTC) Received: from mx0b-0064b401.pphosted.com (mx0b-0064b401.pphosted.com [205.220.178.238]) by mx.groups.io with SMTP id smtpd.web11.2440.1720661964809063174 for ; Wed, 10 Jul 2024 18:39:25 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: windriver.com, ip: 205.220.178.238, mailfrom: prvs=79224067da=changqing.li@windriver.com) Received: from pps.filterd (m0250811.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46AMCsWT022062 for ; Thu, 11 Jul 2024 01:39:24 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2043.outbound.protection.outlook.com [104.47.70.43]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 406u4x4f1a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 11 Jul 2024 01:39:23 +0000 (GMT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bIhIzLwBAd3wc627uXWSP1KUyim3q3ugTKcwryNuis0+Z6Z44s3s3Ng/tjarlTxEwocYfmgjAg+6m/o3csa1hYmmIFEIV6k3eUVpQeWQdfSdcx4KcB0IjUHumFIzqU/B2oDGUO5lyG883Y8oUnLYolfKYgReYp9foF1ExdN7oeg7EbJLpA3g4ag53fwLGYJB0f2D1d3RpKSko/d7VOq8MCQ6IQS17iP5eqPGbbrlDz+kW+ICqSnTSSsTa1mICArargWbB8/Kp3Z8w7gUwMCqdCWZBD+jB0/l+kdnez+6dI7y6I3+Z16H246c/UhpJhxKCt53e4JaoZrW3f+9AzsLAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0FO/1Dhm2jh9GG4KnVPwMkQ54r+NT5Gwhl+9q/2qSBA=; b=Ctbi9HJNG3tGZ5MDgVE1Ebixj2/WhMgZORj+6Qbq61D42jX39xqTCH5ofqrFCNhXdwmiiu90VCZf0/O4K9MWI1tFeLtA/Z0jxEcuXM/Ht8bZLF+iK+G0Kd5fKA5IXcrPsxrfvAFqek+tFkTBR++PsDLH3Dg9y9moBFwy91RIRkjIN0VaBX36fLdoQRrIYkuECRRamaj8rxfJmsgEMuwKxfCTeMQ8vE3u9JMOi61rCijMFG6qs8vp+NO4LbmZEBnYlAowkhfys2RkMP6GjtY45lfuPNJ059sqmeInLb0I9djNUlG3qa3GdEnIH3EpbvtqwEIwzsBYoyYSriMRlWt/tQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Received: from DS0PR11MB7312.namprd11.prod.outlook.com (2603:10b6:8:11f::18) by SA1PR11MB8544.namprd11.prod.outlook.com (2603:10b6:806:3a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.20; Thu, 11 Jul 2024 01:39:20 +0000 Received: from DS0PR11MB7312.namprd11.prod.outlook.com ([fe80::8436:b2d3:31a9:1c8c]) by DS0PR11MB7312.namprd11.prod.outlook.com ([fe80::8436:b2d3:31a9:1c8c%4]) with mapi id 15.20.7762.016; Thu, 11 Jul 2024 01:39:19 +0000 Content-Type: multipart/alternative; boundary="------------gRtLsQLcPbjjx9R0Az4V4mOq" Message-ID: Date: Thu, 11 Jul 2024 09:39:14 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [bitbake-devel] [PATCH] bitbake-worker: skipping disable network when unprivileged userns is restricted To: bitbake-devel@lists.openembedded.org References: <20240708081034.1474312-1-changqing.li@windriver.com> <0032b64c-7e46-dc46-d6e1-143ae3fef03b@windriver.com> <5a5820df-602f-4e9c-a0f4-a7982cf76927@windriver.com> <17E0BC4E4EBC9777.21385@lists.openembedded.org> Content-Language: en-US From: Changqing Li In-Reply-To: <17E0BC4E4EBC9777.21385@lists.openembedded.org> X-ClientProxiedBy: TYCPR01CA0185.jpnprd01.prod.outlook.com (2603:1096:400:2b0::11) To DS0PR11MB7312.namprd11.prod.outlook.com (2603:10b6:8:11f::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7312:EE_|SA1PR11MB8544:EE_ X-MS-Office365-Filtering-Correlation-Id: fb007ad0-5973-48db-0c7a-08dca14a488a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|4022899009|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?YXV2TnlNY2J0SGl4Y3cwREE1Slpid3BxVmk3ai94WGxCRWozelpNUlFEeDZK?= =?utf-8?B?eGdZTjV0bWN2YTY5dE93ME02Q2Q2b3hjL2M0R1YwbzNaZVVBRjFjSTBhZG5j?= =?utf-8?B?VWp2aXdKbmhHM1pwRGZyYm5uSzVmZ1Q5OEdWbEdrQzg4Ni84RE1IY2syWXNi?= =?utf-8?B?N1R5YkFTOHRXNENUMkxWL1duUEFjODRWZG1RZ2FOb1BPQlRPTFZteEVxSVo2?= =?utf-8?B?T3ZLQUl2cUNJUThHN3M4bGdPU2Z3UEYyeDVVVGVMZmsxci9IT25Ba1pXZ0NO?= =?utf-8?B?b3BM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DJJQjM0dHdO?= =?utf-8?B?Ykc5eFFMTkE5KzRNV3dXSkF2TE9pMGUxSDdWekVMUklNQW0zOVh5UVpaYi85?= =?utf-8?B?M2RjdG9IYXJrSVJLTld4SVozMjBuZVA4ZXptYUZuSXhRNDV6VEtMeFZGTThX?= =?utf-8?B?Tm9saVhPeUphL1lTdEpGNEtQcmlvZU41K3FtMXdRa05iWXdJUDEzd3JDN0Rx?= =?utf-8?B?U1QvMTIybGIwRVA2Mm9nLzkvdWpqdG54UTZoZFY0N3FlTGN0MjBnakM4K25q?= =?utf-8?B?UHBSQlVHcnhaR2srMGJZVmhyUmVxM3Z5WnZoOWR3ZU9rZjdhdEg3TjVkYmtv?= =?utf-8?B?Z2NXWjB3S3BDZ0FJU0ZkOC93ZlptN1lrT01hdUZibEQ2d3lIYVhTRGdFVCsx?= =?utf-8?B?R3duK0ZaVytOaUIwcmU4b21SZVZ1TXR6TEdrZGdtOXZmMUMzeGM4UE91Vmw4?= =?utf-8?B?bU13TWJFTTkxdWlEZzB6dmZFR0g4WkhUaUV6MTJiRUVIV3FXaDlHcGdKTmN6?= =?utf-8?B?SWpSL3hXSGQ4emVHbG5ZUWVuL3lFQThLZ1BmRmtzeFNFTWVtcVh4TWRMeURj?= =?utf-8?Q?Ox77wYvvlY14q4CiNs=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB7312.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(4022899009)(1800799024)(376014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?N0RsdlZsVzl1MGpjY0ZPRzYrSzBFRVlIZXhzRWFKN041QjdQTkNMWUtRQ3ZF?= =?utf-8?B?eFd6ck5QTzh1S1picWFzSGY5bHdBQlcwdDNkd0tZRDcrRldZNlQ1OWdaTk1Y?= =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VBNGlkTWRxS3V5UUhtNVFDSVRD?= =?utf-8?B?c0dDb2JQQkxSb3lyT2xyNGJsRXl2MWZYVm1pRjhXRHZKWDBlVjJyaFJFeGZi?= =?utf-8?B?K0Q1K29vZVNZQzlKOG9lWTlEeHg2UFpUcTlObGN4QXNISmYrNElqV0FxK20z?= =?utf-8?B?S3owNFJsOGthc2hIN3J0aTFvQ3h6eGNkSEUrUXBwT3UxUmQxZ0R0blJOdDJv?= =?utf-8?B?ZmVVeEw2cHRyTzQzTUYyMDN1ZXlDeUVralJqNTZsSzd3Zm55bFE3OXN1Ky9Y?= =?utf-8?B?bnc9PQ==?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb007ad0-5973-48db-0c7a-08dca14a488a X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7312.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jul 2024 01:39:19.7855 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8EKD7wC1g1NUaV2gJlWmxXYlOkf9CJhsJPNLZApHezftURQkwPtK9HdX/N1DR5yVXG+Cwya1X/aqSO9UcsDc+4DctHvhCrc0xWZA6ynbwbA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8544 X-Proofpoint-ORIG-GUID: Mp4xjnjc1FG3eFyAqmy91UwjGMJpXVyM X-Proofpoint-GUID: Mp4xjnjc1FG3eFyAqmy91UwjGMJpXVyM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-10_20,2024-07-10_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 malwarescore=0 bulkscore=0 clxscore=1015 spamscore=0 mlxlogscore=999 priorityscore=1501 lowpriorityscore=0 suspectscore=0 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.21.0-2406140001 definitions=main-2407110009 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Jul 2024 01:39:27 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/16415 --------------gRtLsQLcPbjjx9R0Az4V4mOq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-0064b401.pphosted.com id 46AMCsWT022062 On 7/10/24 11:28, Changqing Li via lists.openembedded.org wrote: > > > On 7/9/24 18:58, Richard Purdie wrote: >> CAUTION: This email comes from a non Wind River email account! >> Do not click links or open attachments unless you recognize the sender= and know the content is safe. >> >> On Tue, 2024-07-09 at 10:41 +0800, Changqing Li via lists.openembedded= .org wrote: >>> On 7/8/24 17:25, Alexander Kanavin wrote: >>>> On Mon, 8 Jul 2024 at 11:12, ChenQi wrote: >>>>> This problem has reported to Ubuntu for 4 months. It was discussed = on >>>>> the Yocto mailing list. People seem to be waiting for Ubuntu. I'm n= ot >>>>> very optimistic about getting a solution from Ubuntu. >>>>> =C2=A0I do not agree. The last comment (#10, added two weeks ago)= in >>>> https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2056555 sho= ws >>>> how to create an apparmor profile specifically for bitbake, so once >>>> this is added to apparmor upstream and makes its way into Ubuntu the >>>> problem will be solved. At that point the forced network disabling >>>> will become unnecessary and damaging. Ubuntu release notes imply >>>> they've done it for things like Chrome and Discord, but they expect >>>> more to be added: >>>> >>>> https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release= -notes/39890#security-improvements >>>> >>> I think applications like Chrome, thunderbird etc are commonly used a= pplications by user, so they are might in >>> ubuntu's package repo, so they will support it and add profile for i= t by default. But for bitbake, it is mostly >>> for developer and and not support by ubuntu. And considering there = might be many other softwares meet this issue, >>> so I am not optimistic that ubuntu will add default profile for all t= hese softwares. so maybe we are still on our own. >>> One option is using this patch, so users don't have to struggle on t= his problem, don't need sudo, don't need an apparmor profile etc, >>> but have the side effect that skip disable network, we need to balan= ce which to choose. >>> One option is document or notice message in oe-init-build-env, sugg= est user to disable unprivileged_userns or write a profile for bitbake. >> I do not want to just stop disabling the network silently so the patch >> as written isn't an option. >> >> I'm also not keen to make oe-init-build-env too complex, it is meant t= o >> be just enough to get us into bitbake, nothing more. Adding sanity >> checks there is the wrong place. This could happen in the normal >> sanity.bbclass code but we need to make sure it triggers when a user >> upgrades their existing distro. >> >> I think we should open a new ticket with ubuntu specifically about >> adding a profile for bitbake and see if we can get a definitive answer >> on whether we can add a profile for it or not. I'd suggest a new ticke= t >> so we don't get confused with the comments in the one linked above. > > file a new ticket=20 > https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2072615 > > let's wait to see if the recommended profile can be acceptted. > Hi, The request is rejected as following comments: Unfortunately, as John has stated in this comment: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2063976/comments/= 3=20 We are not able to ship a profile for bitbake running in a writable=20 location of an unprivileged user because it could be used to bypass the=20 restriction. Regards Changqing > Regards > > Changqing > >> Cheers, >> >> Richard >> >> >> > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > Links: You receive all messages sent to this group. > View/Reply Online (#16414):https://lists.openembedded.org/g/bitbake-dev= el/message/16414 > Mute This Topic:https://lists.openembedded.org/mt/107099079/3616873 > Group Owner:bitbake-devel+owner@lists.openembedded.org > Unsubscribe:https://lists.openembedded.org/g/bitbake-devel/unsub [chan= gqing.li@windriver.com] > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- > --------------gRtLsQLcPbjjx9R0Az4V4mOq Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 7/10/24 11:28, Changqing Li via lists.openembedded.org wrote:


On 7/9/24 18:58, Richard Purdie wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

On Tue, 2024-07-09 at 10:41 +0800, Changqing Li via lists.openembedded.org wrote:
On 7/8/24 17:25, Alexander Kanavin wrote:
On Mon, 8 Jul 2024 at 11:12, ChenQi <Qi.Chen@windriver.com> wrote:
This problem has reported to Ubuntu for 4 months. It was discussed on
the Yocto mailing list. People seem to be waiting for Ubuntu. I'm not
very optimistic about getting a solution from Ubuntu.
 I do not agree. The last comment  (#10, added two weeks ago) in
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2056555 shows
how to create an apparmor profile specifically for bitbake, so once
this is added to apparmor upstream and makes its way into Ubuntu the
problem will be solved. At that point the forced network disabling
will become unnecessary and damaging. Ubuntu release notes imply
they've done it for things like Chrome and Discord, but they expect
more to be added:

https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#security-improvements

I think applications like Chrome, thunderbird etc are commonly used applications by user, so they are might in
ubuntu's package repo,  so they will support it and add profile for it by default.  But for bitbake,  it is mostly
for developer and and not support by ubuntu.  And considering  there might be many other softwares meet this issue,
so I am not optimistic that ubuntu will add default profile for all these softwares.  so maybe we are still on our own.
One option is using this patch,  so users don't have to struggle on this problem, don't need sudo, don't need an apparmor profile etc,
but have the side effect that skip disable network,  we need to balance which to choose.
One option is document or  notice message in oe-init-build-env,  suggest user to disable unprivileged_userns or write a profile for bitbake.
I do not want to just stop disabling the network silently so the patch
as written isn't an option.

I'm also not keen to make oe-init-build-env too complex, it is meant to
be just enough to get us into bitbake, nothing more. Adding sanity
checks there is the wrong place. This could happen in the normal
sanity.bbclass code but we need to make sure it triggers when a user
upgrades their existing distro.

I think we should open a new ticket with ubuntu specifically about
adding a profile for bitbake and see if we can get a definitive answer
on whether we can add a profile for it or not. I'd suggest a new ticket
so we don't get confused with the comments in the one linked above.

file a new ticket https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2072615

let's wait to see if the recommended profile can be acceptted.

Hi,

The request is rejected as following comments:

Unfortunately, as John has stated in this comment:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2063976/comments/3
We are not able to ship a profile for bitbake running in a writable location of an unprivileged user because it could be used to bypass the restriction.

Regards

Changqing

Regards

Changqing

Cheers,

Richard




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#16414): https://lists.openembedded.org/g/bitbake-devel/message/16414
Mute This Topic: https://lists.openembedded.org/mt/107099079/3616873
Group Owner: bitbake-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [changqing.li@windriver.com]
-=-=-=-=-=-=-=-=-=-=-=-

--------------gRtLsQLcPbjjx9R0Az4V4mOq--