Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA19F126F0A for ; Sat, 4 Apr 2026 09:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775294401; cv=none; b=CCy9IHq4rGcj4JehhW4rgrtYuC2QcYIoBK2qrGVS3feBe+OCBfmLlKEVW5/sRNL//P7uvV6EpAvSEBM5ZU1QywnsL6heQ4YXAjfvFAAGcrKXa9zN3YeOjvY4kUYu8mE/6Txb6uPZxqszunP7pwuJ7XyH9idabZXti0XX+DStDzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775294401; c=relaxed/simple; bh=yD9ujRf98laGJDQNCmqQhMtqGPaa8xO9gsmQdUwHm2o=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=XVJwi1JRtaKNrbPBkd+BJhxIqLKXg343u+sOuECa2hbT5ElLy+DpjzxeQSVRaSRT0Rj84aCac3Y+yTvCeu5cd+4Pv6XNIm7raQp4Fo7lKzgPdv/RUn5zB5+h0tHCmlI8/HsljowT+VuLziyFmdpOyZz/Z5MLQtMPDb7PbN3IUoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=UWaht0QV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=gZIuNqPD; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="UWaht0QV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="gZIuNqPD" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6344Bos73884322 for ; Sat, 4 Apr 2026 09:19:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= W5wQp+ZYJHvxqgxkhmqU3cDlpiXXFqirK4uCs69FpvM=; b=UWaht0QV0xrHTb05 nj+N8q3+anwdSD7syqbMT0FnSZoXoiwveb0FMNJbMDvP49Zmc+ns3pcOVv6ewpGe nMeoyC6NJP3tQQvrGuhcC74pfcBX5Kepum6xC/NVjc1NPF31EB4jrXVZszJ0NgSn 7eFU36hSmBjlxR8zAceqnzpzma+NFgDrJOmX9A7MXsOpYquhISV6D2QhjGQBO6Xe PE6NvRdM50/Bq0ptIbeuEXUrlpBWCMhL2ot6JuMKuQDoD0MKYpJSjlfFu2d1SSVI wjjvywDg5Aii56nOzLPrOWF9R/69MrrzhbeTNydRzm38OmBtwCIcC1vMo8AxyXZN twOX9g== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4daudd0g4c-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 04 Apr 2026 09:19:58 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-2c5377411ecso31753eec.0 for ; Sat, 04 Apr 2026 02:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775294398; x=1775899198; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=W5wQp+ZYJHvxqgxkhmqU3cDlpiXXFqirK4uCs69FpvM=; b=gZIuNqPDU0EDP5UmcZdtGbj5/eyjCH8+0oseYdqWU64R45L5/VzbZxRSYwf+gwZIVT BkLsTw6TXMerbndRGi1mWYEFyhFZ6i288Noh1qiFLPgwL0OmVWDMLiYavyDOiPGuXyiz KvbmDiL1nZ5UstZ7kuiw7WFTxBAJHVs1L/FM5cdUuDJ6KYFrd7AifF4uCyBeV+/TpUHe nnQKI0kHhZj7m/QmPwTLH9a7YWVW3505vGZ9pqQBjsAtkvK37X4qi43Qcsc2ibFl6i7q j89qHf8WR8AdyQakEU2+yix4dJ36BeAUIdEuL44LHFr8Oz6Xm3rL63Bg9qxQlOVHAaN8 0B3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775294398; x=1775899198; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=W5wQp+ZYJHvxqgxkhmqU3cDlpiXXFqirK4uCs69FpvM=; b=bGXsfKP8U+GocTR0qwjVWhzq86Zhy2c3btfbda+YQjFRw1Mwo0XW3dxKN9/82WqUkY Ifppvy6J+jlahveIvf6rNru5lvR2FaMkRWxh9hlVVQ2eEpkX3U2xjsYGEA8MueSlGlqM +0JPXuJ7t/mU37AD0Obfs2J6Q49BNcrMy9+hRw+XD1WvX3kSS0vedNVWb9SxWHDLojE9 aPVigzEXboRvcDaYauRysimS5yXGb2zZAuYTNEDo3+Ub7exklLihIKkVPp49yFMWNvaH z3uZqUlM/iMm0HCzc5NXsU43jzJL1cWG1QVlKaORjHjOZ4J/61fxF/abRgp5JF3AwAyU oD0g== X-Forwarded-Encrypted: i=1; AJvYcCVFRhNbSlzQkizolzt/jnSVCJRqGeT/rKqmfRLg4I/Ze2TdmR42JBnRRzV8SF8JoHwtJb9OEjCgqPvfSPHzehtSBQ==@vger.kernel.org X-Gm-Message-State: AOJu0YzVK+hTvTsC1RV5ArKE2CWsYz6qMOuWsi6LI4ImTz63rcRurnVl +3dZvC4ENv17JSOr6xd45tjqFRj7B/iIH6JnT5aTxkSYzOo9v9nWfgrANSOacOaYNHlDgCFdGMS scSkc7W+nA+53T19p0h/WgKs6D40H8WIVL0Sv+4gJ/Ytw59fVHr6J19a5MJdXMk1ojuzTgAXI3N de6Us0bQ== X-Gm-Gg: AeBDiesdWN1PJTstOWqaVQVFw6pFzDA2yKntgCrz66JXd03YoM1sDlrufRylCew6l+U zdHT5oiuWvFwuoHsbM4Wv460k4V+PbEuN4ywD1I7SKMFN8EQIxJxG+B9wXMzGr5A697JEkVba1B LL+Dr1N4IoqmC0astD1J8lfG9gcfUBm0K+0fl3ZhDSZbKyNthBKV8MDeEX6BX7IppNQZQjWsGhn 8R5tQlQYdpQU/0CCrRaWyTRio/N5zP37Q+HpYhHiwoZLSaF+rih7EeVwddjlqReJr0S7PzJMJDy 0AlUvkGp8dmVnt2MvPIrEhl30JilzIx653EJCSLTVbZTRoTd/tAJ1qPPhHuq19ofbGYyXE/nut5 LAzYfhkYJnwMNvu6gHppdeWxBTyGVPWv0qJs3sEg1KpY= X-Received: by 2002:a05:7301:6784:b0:2c4:acef:291a with SMTP id 5a478bee46e88-2cbfbc7dc06mr1240947eec.4.1775294397918; Sat, 04 Apr 2026 02:19:57 -0700 (PDT) X-Received: by 2002:a05:7301:6784:b0:2c4:acef:291a with SMTP id 5a478bee46e88-2cbfbc7dc06mr1240941eec.4.1775294397298; Sat, 04 Apr 2026 02:19:57 -0700 (PDT) Received: from [10.239.96.29] ([114.94.8.21]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2ca7c20b2b1sm7851645eec.18.2026.04.04.02.19.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Apr 2026 02:19:56 -0700 (PDT) Message-ID: <6dfcae79-bc3d-4258-a2c1-4cbd33e7df56@oss.qualcomm.com> Date: Sat, 4 Apr 2026 17:19:53 +0800 Precedence: bulk X-Mailing-List: selinux-refpolicy@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Wei Deng Subject: Re: [PATCH] sepolicy: Allow bluetooth to send D-Bus messages to systemd To: "Christopher J. PeBenito" , selinux-refpolicy@vger.kernel.org Cc: cheng.jiang@oss.qualcomm.com, shuai.zhang@oss.qualcomm.com, quic_mohamull@quicinc.com References: <20260403063120.2752877-1-wei.deng@oss.qualcomm.com> <7ee9976c-821e-4aec-83e9-3a820f097901@ieee.org> Content-Language: en-US In-Reply-To: <7ee9976c-821e-4aec-83e9-3a820f097901@ieee.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: y1aj5yvMCeMx_RYhBi8KRZRBG0dxgFrO X-Authority-Analysis: v=2.4 cv=JZ2xbEKV c=1 sm=1 tr=0 ts=69d0d7be cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=Uz3yg00KUFJ2y2WijEJ4bw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=lGS-OWvyc7CGE-KEI60A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDA0MDA4MyBTYWx0ZWRfX0nusqKq9Hkzx kuEW23hsDvDnXt23Qs+8TdoL3qI2BZuhGtUedByo5YdeFElEJwcmaECIna1CZ5nDEAxld6Wh4it KzawpRFqcknm+C1KH6FdfPgnRQMxfhjI5TD3s5+00OCj3arc8oyj3P4/eD8L7Rtq64MPmt9EbVZ OXOULGvgfkudUHC0YeCHLOGHs5OBpeVhPgE+PIJT1J1ibLglF9JNNYwvgCAYU1Cp7aOIJgqGSOp 1vfu9ZIjvMUS5M+ayQVKyJHpAsbmJNEOq3dPlMqCIyN9c6CioJX4YRU71pT0uafe62r+VPTGD93 qVrIoP2qkveVAtK6SJfngk08jlj5K3zrVlNzzlTutD66zhBjEqOhPn3P0mlobquet9GPNYbQrNj WqkOxB2EHESNVl8Awa4uq/zqnSPzy2tCEAgVgYZ0gBcUJRK/BnWplaakhSHLYViHoxEVPUpbN8X rpmkJiVZTPDTG30AMqw== X-Proofpoint-GUID: y1aj5yvMCeMx_RYhBi8KRZRBG0dxgFrO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-03_07,2026-04-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 malwarescore=0 suspectscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 spamscore=0 bulkscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604040083 Hi Chris, Thanks for the review. On 4/3/2026 10:01 PM, Christopher J. PeBenito wrote: > On 4/3/26 2:31 AM, Wei Deng wrote: >> Add init_dbus_chat() for bluetooth_t to allow bluetoothd to send >> D-Bus method_return messages back to systemd (init_t) over the >> system bus. >> >> Below avc denial is fixed with this patch: >> >> avc:  denied  { send_msg } for  msgtype=method_return dest=:1.11 >> scontext=system_u:system_r:bluetooth_t:s0 >> tcontext=system_u:system_r:init_t:s0 tclass=dbus permissive=0 >> >> Signed-off-by: Wei Deng >> --- >>   policy/modules/services/bluetooth.te | 1 + >>   1 file changed, 1 insertion(+) >> >> diff --git a/policy/modules/services/bluetooth.te b/policy/modules/services/bluetooth.te >> index ceb42d147..a73cb5db0 100644 >> --- a/policy/modules/services/bluetooth.te >> +++ b/policy/modules/services/bluetooth.te >> @@ -136,6 +136,7 @@ userdom_dontaudit_search_user_home_dirs(bluetooth_t) >>   optional_policy(` >>       dbus_system_bus_client(bluetooth_t) >>       dbus_connect_system_bus(bluetooth_t) >> +  init_dbus_chat(bluetooth_t) >>       init_dbus_send_script(bluetooth_t) >>         optional_policy(` > > Can you confirm this response is going to systemd/pid1? Is there a fuller set of log messages corresponding to this denial? The init_dbus_send_script() makes me wonder. The two log entries list here: type=SERVICE_START msg=audit(19.419:292): pid=1 uid=0 subj=system_u:system_r:init_t:s0 msg='unit=bluetooth comm="systemd" exe="/usr/lib/systemd/systemd" ... res=success' type=USER_AVC msg=audit(19.547:319): subj=system_u:system_r:system_dbusd_t:s0 msg='avc: denied { send_msg } for msgtype=method_return dest=:1.11 spid=684 tpid=843 scontext=system_u:system_r:bluetooth_t:s0 tcontext=system_u:system_r:init_t:s0 tclass=dbus permissive=0 exe="/usr/bin/dbus-daemon"' > Can you confirm this response is going to systemd/pid1? > Is there a fuller set of log messages corresponding to this denial? Yes. The SERVICE_START entry shows pid=1 with exe="/usr/lib/systemd/systemd" running under init_t, confirming that init_t is systemd's SELinux domain. > The init_dbus_send_script() makes me wonder. They target different domains: init_dbus_send_script(): bluetooth_t -> initrc_t (SysV init scripts) init_dbus_chat(): bluetooth_t <-> init_t (systemd itself) Both are needed for cross-platform compatibility. > -- Best Regards, Wei Deng