Re: tough neverallow

Henry Zhang <[email protected]> Mon, 27 Feb 2023 21:47:36 -0800
Newsgroups gmane.linux.redhat.fedora.selinux
Message-ID <CANTW0yqpjTqqP5C4wfBxDo_Ni9FEYbBWSY9TyuS6s6tmUdcLRg@mail.gmail.com>
Simon,

kernel.if of SELinux contains self and I copy attribute and typeattribute
to make ota_client_t accessing self so that
"allow ota_client_t self: capability sys_module" works

---henry

On Fri, Feb 24, 2023 at 8:46 PM Simon Sekidde <[email protected]> wrote:

> On Thu, Feb 23, 2023 at 12:38 PM Henry Zhang <[email protected]>
> wrote:
>
>> Hi folks,
>>
>> I meet a tough neverallow problem:
>> (neverallow base_typeattr_8 self (capability (sys_module)))
>> |     <root>
>> |     allow at
>> /mnt/disk2/henryzhang/sec-4715/connectivity-bsp/build-ctx0700-updater/tmp/work/ctx0700-fsl-linux/refpolicy-mcs/2.20190201-r0/image/var/lib/selinux/mcs/tmp/modules/100/ota_client/cil:678
>> |       (allow ota_client_t self (capability (net_raw sys_module sys_resource
>> mknod)))
>>
>> The SELinux interface does not contain ota_client_t but file
>> usr/share/selinux/devel/include/system/unconfined.if: allow $1
>> self:capability ~{ sys_module };
>>
>> I do not know how to make following worked
>> allow ota_client_t self (capability (net_raw sys_module sys_resource
>> mknod))
>>
>
> Does the ota_client app need these caps? See capabilities(7) or
> /usr/include/linux/capability.h
> Are you able to manage the app with a confined user like sysadm_u instead?
>
>
>> Please advise.
>>
>> Thanks.
>>
>> ----henry
>> _______________________________________________
>> selinux mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>> Fedora Code of Conduct:
>> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives:
>> https://lists.fedoraproject.org/archives/list/[email protected]
>> Do not reply to spam, report it:
>> https://pagure.io/fedora-infrastructure/new_issue
>>
>
>
> --
>
> Simon Sekidde
>
>
>

_______________________________________________
selinux mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue