Skip to content

refpolicy: seatd: allow self fifo_file read/write for signal handling - #2846

Open
fangwu (fangwu1) wants to merge 1 commit into
qualcomm-linux:masterfrom
fangwu1:seatd-selinux-fix
Open

refpolicy: seatd: allow self fifo_file read/write for signal handling#2846
fangwu (fangwu1) wants to merge 1 commit into
qualcomm-linux:masterfrom
fangwu1:seatd-selinux-fix

Conversation

@fangwu1

@fangwu1 fangwu (fangwu1) commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

seatd uses a self-pipe trick to deliver signals to its event loop: the signal handler writes \0 to signal_fds[1] to wake up ppoll() in the main loop. Without SELinux
permission to access its own fifo_file, seatd cannot process SIGTERM during shutdown, causing a 90-second reboot delay.

Fix: Add allow seatd_t self:fifo_file rw_fifo_file_perms; to policy/modules/services/seatd.te.

Verified on: iq-x5121-evk (X1E80100) with SELinux in enforcing mode.

Upstream status:

This patch is a temporary backport via .bbappend, following the same pattern as the existing patches in refpolicy-targeted_git.bbappend. It will be dropped once meta-selinux bumps SRCREV_refpolicy to include the upstream fix.

@lumag Dmitry Baryshkov (lumag) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write readable PR description. Also plesae correct your Git setup to stop using the login name.

Signed-off-by: fangwu fang.wu@oss.qualcomm.com

@fangwu1

Copy link
Copy Markdown
Contributor Author

Updated

seatd uses a self-pipe trick to deliver signals to its event loop.
The signal handler writes '\0' to signal_fds[1] (a pipe) to wake up
ppoll() in the main loop. Without permission to write to its own
fifo_file, SELinux denies the write with EACCES, preventing seatd
from processing SIGTERM during shutdown and causing a 90s reboot delay.

Verified on iq-x5121-evk (Purwa, X1E80100) with SELinux enforcing.

Upstream-Status: Backport [SELinuxProject/refpolicy@a7e7df1]
Signed-off-by: Fang Wu <fang.wu@oss.qualcomm.com>
@github-actions

Copy link
Copy Markdown

Test run workflow

Test jobs for commit 438f213

nodistro
Pass: 10 | Fail: 0 | Total: 10
qcom-distro
Pass: 308 | Fail: 6 | Total: 341
qcom-distro_linux-qcom-6.18
Pass: 7 | Fail: 1 | Total: 8

@test-reporting-app

Copy link
Copy Markdown

Test Results

   79 files  ± 0    408 suites   - 1   7h 27m 59s ⏱️ - 53m 17s
  160 tests  -  1    143 ✅ +21   3 💤 +2  14 ❌  - 24 
2 664 runs  +15  2 618 ✅ +66  27 💤  - 4  19 ❌  - 47 

For more details on these failures, see this check.

Results for commit 438f213. ± Comparison against base commit 7b36365.

This pull request removes 1 test.
5_BT_ON_OFF ‑ BT_ON_OFF
This pull request skips 2 tests.
11_Ethernet ‑ Ethernet
6_AudioRecord ‑ AudioRecord

@qcomlnxci

Copy link
Copy Markdown

Test Coral run workflow

Test jobs for commit 438f213

  • qcomdistro: multimedia image
    Pass: 9 | Fail: 0 | Total: 9
  • qcomdistro: multimedia image-prop
    Pass: 48 | Fail: 0 | Total: 48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants