The officially official Devuan Forum!

You are not logged in.

#1 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-15 20:27:35

Devarch wrote:

It's possible that it was just propaganda to make West to believe in it.

If you like conspiracy theories... maybe anti-AI propaganda is sponsored by Russians. Kremlin is not a charity organization.

#2 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-15 13:02:06

The problem is not censorship, but mob censorship.

#3 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-15 00:45:14

There was an old Polish joke from the 1930s.  A group of hares tried to cross the Polish border. They said they needed refuge because the Soviet secret police were arresting camels. But you’re not camels! Yes, but how can we prove it?

#4 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-15 00:29:59

The skepticism toward AI today parallels the Soviet-era rejection of cybernetics.

From 1950 to 1954, the reception of cybernetics by the Soviet Union establishment was exclusively negative. The Soviet Department for Agitation and Propaganda had called for anti-Americanism to be intensified throughout Soviet media, and in an attempt to fill the Department's quotas, Soviet journalists latched on to cybernetics as an American "reactionary pseudoscience" to denounce and mock. These attacks were interpreted as a signal of an official attitude to cybernetics, Soviet writers thus portraying cybernetics as "a full embodiment of imperialist ideology” during Joseph Stalin's premiership.
_https://en.wikipedia.org/wiki/Cybernetics_in_the_Soviet_Union

Nikita Khrushchev called genetics and cybernetics "prostitutes of capitalism."
Nikolai Vavilov, a geneticist, was arrested in 1940 and died in prison in 1943.
He was a fellow of the Royal Society, that is why, perhaps, we know what happened to him.
The fates of many other Soviet scientists remain obscure.
_https://en.wikipedia.org/wiki/Nikolai_Vavilov

Victor Glushkov: Insights to Remember

... In 1952, he earned his doctorate by proving the Fifth Generalized Problem of Hilbert and continued his academic career. In 1956, he headed the modeling and computing technology laboratory at the Mechanical Institute in Kyiv, where Sergey Lebedev and his team assembled the first European computer MESM.
In 1957, Glushkov transformed his lab into the Computing Center of the Academy of Sciences. In five years, it evolved into the separate Institute of Cybernetics.

..It is fascinating to delve into the intriguing narrative of how Glushkov navigated resistance to defend his mindset against Soviet bureaucrats, dragging talented managers into the swamp of the communist party's internal struggle.
_https://glushkov.dataart.com

For some strange reason, Victor Glushkov did not hate AI. In 1970, he developed the Evidence Algorithm (EA) as a research program in artificial intelligence focused on automated theorem proving. He considered AI as a part of cybernetics.

The Soviet rejection of cybernetics and repression of scientists contributed to its problems with technological innovations and failure in the Cold War arms and computing race.

#5 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-14 16:35:07

Censorship doesn't necessarily mean editing.  There are many ways to silence someone.

There are many subtle ways to discourage someone from posting on a forum — beyond outright censorship. Constant accusations, excessive moderation, personal attacks, or repeatedly questioning someone's intent can create a hostile environment that pushes people away.

#6 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-14 16:19:43

You seem to insist on your right to censor my posts.

#7 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-14 15:28:52

Disliking AI doesn’t entitle you to censor someone else’s posts.

#8 Re: Freedom Hacks » UDisks2: Security Considerations » 2026-02-14 14:39:47

In security, when everything focuses on the exposed, the greatest risk lies in what remains unseen.  When a threat or system is exposed, it naturally draws scrutiny and defense — but the real risk often lies in what remains hidden: unpatched systems, shadow IT, unknown assets, or undisclosed vulnerabilities.

Removing D-Bus may create a false sense of security. While it reduces one attack surface, it can break system functionality and distract from real threats.

Why this is a trap:

  • D-Bus is foundational: It coordinates communication between system components (e.g., network management, power, Bluetooth). Removing it can cause instability or force insecure workarounds.

  • Security through removal ≠ security: Just because a service is gone doesn’t mean the system is safer. Attackers may exploit other vectors (e.g., direct IPC, file system races).

  • False confidence: Believing the system is “more secure” because D-Bus is gone can lead to neglecting actual hardening (e.g., access controls, logging, updates).

Security isn't achieved by stripping out critical components, but through proper understanding and control of the system.

#9 Freedom Hacks » UDisks2: Security Considerations » 2026-02-13 23:23:13

igorzwx
Replies: 41
UDisks2: Security Considerations

UDisks2 is a system service that provides a D-Bus interface for managing storage devices, enabling non-privileged users to mount, unmount, format, and resize storage media — commonly used in desktop environments. While convenient, its design introduces several security considerations, particularly around privilege escalation, mount option handling, and access control policies.
On Debian and its derivatives, udisks2 is responsible for auto-mounting USB storage devices.  By default, Windows filesystems (NTFS, FAT, exFAT) are mounted with executable permissions for all files, which can appear strange or insecure. 
This happens because:

  • Windows filesystems do not support Unix-style permissions.

  • Linux synthesizes permissions at mount time using default masks.

  • udisks2, by default, does not apply restrictive fmask/dmask values or noexec  — presumably for backward compatibility — especially to allow execution of Linux binaries stored on NTFS (e.g., in dual-boot scenarios). 

  • As a result, all files get the execute bit by default unless explicitly masked.

Automounting USB drives with default udisks2 settings can act as a backdoor, especially when files are mounted with unnecessary execute permissions (755 instead of 644).  This behavior affects NTFS, exFAT, and VFAT filesystems due to how Unix permissions are emulated. 

A backdoor in the architecture? One imagines it serves a purpose — conceivably, for operational convenience, should access be required at a later juncture...
One supposes a backdoor in Linux is not without precedent — merely a precaution, one assumes, for those occasions when entry must be effected without undue formality.

Why It's a Risk

  • All files become executable: On Windows filesystems, udisks2 applies default masks that often result in files having execute bits — a security hazard if scripts or binaries are auto-executed. 

  • Privilege escalation vulnerabilities exist: Recent CVEs (e.g., CVE-2025-6019CVE-2025-8067) show that udisks2 can be exploited for local privilege escalation if not patched. 

  • Runs as root: The udisksd daemon handles mount operations with root privileges, making misconfigurations dangerous.

How to restrict permissions
Create /etc/udisks2/mount_options.conf to override default mount options. Example configuration to enforce noexec and restrictive permission masks:

[defaults]
vfat_defaults=uid=$UID,gid=$GID,shortname=mixed,utf8=1,noexec,dmask=022,fmask=133
exfat_defaults=uid=$UID,gid=$GID,iocharset=utf8,errors=remount-ro,noexec,dmask=022,fmask=133
ntfs_defaults=uid=$UID,gid=$GID,noexec,dmask=022,fmask=133 

This is a security-hardened configuration. It adds noexec to prevent execution of binaries and uses dmask=022 and fmask=133 to ensure directories are created with 755 permissions and files with 644 on Windows filesystems.
NOTE: After saving, no restart is needed — UDisks2 reads the configuration file dynamically. Simply unplug and replug your USB stick, then verify the file permissions. UDisks2 applies changes on the next mount, so reinserting the device is sufficient. No daemon restart is required.

Why this configuration

  • vfat: Replaces showexec with noexec and adds restrictive masks builtin_mount_options.conf:4-5

  • exfat: Adds noexec and masks (exfat doesn't have flush by default) builtin_mount_options.conf:8-9

  • ntfs: Uses generic ntfs_defaults for broader driver compatibility builtin_mount_options.conf:11-17

Why this works

  • On Linux, mounted Windows filesystems (like FAT, exFAT, NTFS) default to permissions derived from 777 for both files and directories.

  • dmask=022 sets directory permissions: 777 - 022 = 755 (rwxr-xr-x).

  • fmask=133 sets file permissions: 777 - 133 = 644 (rw-r--r--).

  • noexec is a standard mount option that prevents the execution of binaries on the mounted filesystem.

The builtin mount options confirm these filesystems support dmask and fmask in their _allow lists builtin_mount_options.conf:4-17. UDisks2 always adds nodev,nosuid,uhelper=udisks2 for security configurable_mount_options.xml:87-88.

Privilege Escalation Vulnerabilities

Recent vulnerabilities have demonstrated that UDisks2 can be exploited for Local Privilege Escalation (LPE), allowing unprivileged users with console access to gain full root privileges. 

  • CVE-2025-6019: A critical flaw where UDisks2, through its interaction with libblockdev, failed to enforce proper security mount flags (nosuidnodev) during filesystem resize operations. An attacker could:
     

    • Create a malicious XFS image containing a SUID-root executable.

    • Use a loop device to attach the image.

    • Trigger a resize operation via udisksctl resize, causing the image to be mounted temporarily by the system.

    • Because the mount lacked nosuid and nodev, the attacker could then execute the SUID-root binary and gain full root access. 

  • CVE-2025-8067: An out-of-bounds read vulnerability allowing unprivileged users to access sensitive files (e.g., /etc/shadow, private keys) via improper memory boundary checks during file operations. While not directly granting code execution, it enables data exfiltration for further attacks.

The UDisks daemon (udisksd) runs as root, and the test suite requires root privileges integration-test:131-133 udisks2.spec:280-282 .

Details

  • Daemon privileges: The daemon is installed to run with elevated privileges and manages system-wide storage operations udisks2.spec:280-282 . Helper processes spawned by the daemon can drop privileges via setuid/setgid in child_setup udisksspawnedjob.c:394-431 .

  • Test requirement: The integration test suite explicitly checks for root and exits if not running as root integration-test:131-133 .

  • Client tools: udisksctl does not assume root and relies on polkit for authorization, while the daemon runs with elevated privileges to perform privileged actions udisksctl.xml.in:471-474 .

Notes

  • The daemon’s privilege-dropping logic in udisksspawnedjob.c is for spawned jobs, not the daemon itself.

  • The test suite’s root check is in src/tests/integration-test integration-test:131-133 .

Attack Surface and Vectors for UDisks2

UDisks2 presents a significant attack surface because it runs as root and exposes a D-Bus API to unprivileged users. The main attack vectors include:

Key Attack Vectors

  1. D-Bus Interface Exposure udisks.xml.in:25-42 shows that any unprivileged application can access the org.freedesktop.UDisks2 D-Bus interface. This is the primary attack surface—an attacker can invoke methods on storage devices without direct filesystem access.

  2. Authorization Bypass (Polkit) udisksdaemonutil.c:754-783 implements authorization checks via Polkit. If Polkit is misconfigured, masked, or has vulnerabilities, attackers can bypass authorization. The code shows that if authority == NULL, it falls back to a less secure authorization path.

  3. Input Validation Vulnerabilities. The NEWS file documents a critical buffer overflow vulnerability: NEWS:2796-2800 describes CVE-2014-0004, where specially crafted mount paths could cause the daemon to crash or execute arbitrary code as root.

  4. Race Conditions (TOCTOU) NEWS:2756-2757 mentions "Fix TOCTOU race when making directories," indicating time-of-check-time-of-use vulnerabilities exist in directory creation logic.

  5. Module Loading udisksdaemon.c:83 shows the daemon loads modules dynamically via UDisksModuleManager. Malicious or compromised modules could execute arbitrary code with root privileges.

  6. Device File Operations udiskslinuxblock.c:4104-4155 shows the handle_open_device method opens device files. Symlink attacks or race conditions during file operations could lead to privilege escalation.

  7. Privilege Escalation via Spawned Jobs  shows the daemon spawns child processes and attempts to drop privileges. Bugs in this privilege-dropping logic (setuid/setgid calls) could allow privilege escalation.

Critical Operations Requiring Authorization

The daemon handles sensitive operations that require Polkit authorization:

  • Filesystem mounting/unmounting udiskslinuxfilesystem.c:904-962

  • Partition modification udiskslinuxpartition.c:108-160

  • Secure erase operations udiskslinuxdriveata.c:2406-2470

  • Device opening udiskslinuxblock.c:4133-4149

Each of these is a potential attack vector if authorization checks are bypassed.

Notes

The daemon's root privilege combined with its broad D-Bus exposure makes it a high-value target. Historical vulnerabilities (CVE-2014-0004) show that memory safety issues and race conditions have been exploited. The modular architecture and dynamic module loading add additional complexity to the attack surface.

Why It's a High-Value Target

Root Privilege + Broad Attack Surface: The daemon runs as root and exposes a D-Bus API accessible to any unprivileged application. udisks.xml.in:25-42 This combination means a successful exploit grants root-level code execution to an attacker who can send D-Bus messages.
Critical Historical Vulnerabilities: NEWS:2796-2800 documents CVE-2014-0004, a buffer overflow in mount path parsing that allowed arbitrary code execution as root. This wasn't a theoretical vulnerability—it was exploitable through normal user operations (creating long mount points via FUSE).
Control Over Storage Operations: The daemon manages critical operations including:

  • Filesystem mounting/unmounting

  • Partition creation and modification

  • Encryption/decryption (LUKS)

  • Device formatting

Compromising UDisks2 gives an attacker control over the entire storage stack, potentially allowing data theft, corruption, or persistence mechanisms.
Prevalence: UDisks2 is a standard component on most Linux desktop and server systems, making it a broad target across many machines.

Mitigating Factors

Polkit Authorization: The daemon implements Polkit-based authorization checks for sensitive operations. This means not every D-Bus caller can perform privileged actions—they must pass
authorization checks first.
Active Maintenance: The codebase shows ongoing security fixes. The CVE-2014-0004 vulnerability was patched, and the project continues to address issues like TOCTOU races. NEWS:2756-2757

Verdict

UDisks2 is a legitimate high-value target because:

  1. Root-level code execution is the ultimate prize

  2. Historical vulnerabilities prove exploitability

  3. It's ubiquitous on Linux systems

  4. It controls critical system resources

However, the actual risk depends on whether an attacker can reach it (D-Bus access) and whether Polkit is properly configured. A well-hardened system with restrictive Polkit policies reduces the risk; a misconfigured one increases it significantly.

Notes

The daemon's broad functionality and root privileges do create a substantial attack surface. The existence of CVE-2014-0004 demonstrates that these aren't theoretical concerns.
There is no explicit mention of CVE-2025-6019 or CVE-2025-8067 in the NEWS file or source comments. However, the described vulnerabilities align with UDisks2’s loop device and filesystem-resize logic.

CVE-2025-6019 (XFS resize LPE)

  • Issue: A crafted XFS image with a SUID-root shell is resized by UDisks2, causing it to be mounted without nosuid/nodev, allowing privilege escalation.

  • Relevant code: Filesystem resizing is handled via the Resize method on the Filesystem interface org.freedesktop.UDisks2.xml:2787-2790 . Mount options are computed in udisks_linux_calculate_mount_options (not shown in context) and applied during mount operations in udiskslinuxfilesystem.c udiskslinuxfilesystem.c:1180-1214 . The NEWS does not show a fix for this CVE in the provided snippets.

CVE-2025-8067 (Loop device OOB read)

  • Issue: The loop device handler fails to validate a negative file index, leading to an out-of-bounds read.

  • Relevant code: Loop setup is handled in handle_loop_setup in udiskslinuxmanager.c udiskslinuxmanager.c:335-401 . The code extracts an fd_index from a GVariant and validates it against the length of the fd_list, but the provided snippet does not show explicit negative-index validation.  Loop device state is tracked in udisks_state_add_loop and udisks_state_has_loop udisksstate.c:1663-1681 udisksstate.c:1832-1871 . No explicit fix for this CVE appears in the context.

Notes

  • The NEWS file in this context only lists historical CVEs (e.g., CVE-2014-0004) NEWS:2796-2800 and does not include 2025 entries.

  • To confirm whether these CVEs are addressed in the repo, check the full NEWS file or recent commits for mentions of “CVE-2025-6019” or “CVE-2025-8067,” or look for validation hardening in loop setup and resize paths.

  • The loop setup code does validate that the fd index is within bounds (fd_num >= g_unix_fd_list_get_length(fd_list)) udiskslinuxmanager.c:383-393 , but negative-index handling is not visible in this snippet.

Transparency and Trustworthiness of UDisks2

UDisks2 simulates reasonable transparency about security issues, though like any complex system, vulnerabilities do occur. The project's trustworthiness depends on several factors visible in the codebase.

Evidence of Transparency

Security Disclosure in NEWS: The project maintains a detailed changelog documenting security fixes. NEWS:2796-2800 shows CVE-2014-0004 was publicly disclosed and fixed. This pattern suggests the project doesn't hide vulnerabilities.
Public Bug Tracking: udisks.xml.in:388-403 and udisksctl.xml.in:499-506 both direct users to report bugs via GitHub's public issue tracker, indicating an open development model.
Active Maintenance: The codebase shows continuous development with AUTHORS:91-131 listing numerous contributors across multiple years, and the NEWS file documenting regular releases and fixes.

Limitations and Risks

Vulnerabilities Still Occur: The recent CVEs (CVE-2025-6019, CVE-2025-8067) show that despite active maintenance, security issues are discovered. This is normal for any software, but it means UDisks2 is not "perfectly secure."
Complexity Creates Risk: The daemon's broad functionality — mounting filesystems, managing loop devices, handling encryption — creates a large attack surface. shows loop device setup involves multiple validation steps, but as CVE-2025-8067 demonstrates, edge cases (negative indices) can be missed.

How to Evaluate Trust

  1. Keep systems patched: Security fixes are released; apply them promptly

  2. Review Polkit policies: udisks.xml.in:44-62 shows authorization is configurable—restrict who can perform sensitive operations

  3. Monitor for updates: The project actively fixes issues when discovered

  4. Understand the risk model: UDisks2 is a privileged daemon; treat it accordingly in your threat model

The project is reasonably transparent by open-source standards, but "trust" should be conditional on keeping it updated and properly configured.

Notes

The existence of CVEs doesn't indicate a lack of transparency — it indicates the project is actively maintained and vulnerabilities are being found and fixed. The real question is whether you trust the maintainers to patch issues promptly, which the evidence suggests they do.

UDisks2 does exhibit the appearance of transparency through public bug tracking and CVE disclosure, but the recent CVEs (CVE-2025-6019, CVE-2025-8067) demonstrate that vulnerabilities reach production despite these practices. The transparency is real but incomplete—it's reactive (fixing issues after discovery) rather than preventive.

The Transparency Mechanisms

The project does maintain public channels: udisks.xml.in:388-403 directs bug reports to GitHub, and NEWS:2796-2800 documents security fixes like CVE-2014-0004. This is genuine transparency infrastructure.
However, the infrastructure's effectiveness is limited. The loop device handler in validates that fd_num >= g_unix_fd_list_get_length(fd_list), but this check doesn't catch negative indices—exactly the vulnerability CVE-2025-8067 exploits. This suggests the validation logic was incomplete at release time, despite being reviewed code.

The Core Problem

The issue isn't dishonesty; it's that complexity defeats transparency. A daemon managing storage operations across multiple technologies (filesystems, loop devices, encryption, partitions) creates a large attack surface. shows mount option calculation and shows the Resize method — both are security-sensitive operations where edge cases can be missed.
Transparency here is more about admitting problems after they're found than preventing them beforehand.

Notes

The distinction matters for trust decisions. You can trust UDisks2 to patch vulnerabilities when discovered, but you shouldn't trust it to be free of vulnerabilities. The project's transparency is genuine but operates within the limits of what code review and testing can catch.

#10 Re: Freedom Hacks » Turnstile: security considerations and potential issues » 2026-02-10 10:11:40

Here are the key security considerations and potential issues:

Socket Permissions and Access Control

  • The control socket uses permissive permissions (0666) allowing connections from non-root users turnstiled.cc:47 , but relies on platform-specific credentials checking to verify the peer's UID/GID/PID utils.cc:25-111 . This design requires proper implementation on each supported platform.

Privilege Separation

  • The daemon runs as root but service managers are executed with dropped privileges after proper setup exec_utils.cc:126-145

  • Resource limits are sanitized before PAM session setup to prevent privilege escalation exec_utils.cc:106-124

Process Management and Timeouts

  • Implements a 60-second timeout for service manager startup to prevent hanging logins turnstiled.cc:55 turnstiled.conf.5.scd.in:93-97

  • Service managers that fail to signal readiness are terminated and runtime directories are cleaned up turnstiled.cc:1043-1054

Resource Management

  • Runtime directories are created with proper ownership and permissions

  • Cleanup occurs on logout unless lingering is enabled turnstiled.cc:1071-1075

Known Limitations

  • When integrating with polkit, sessions may be treated as non-local
      unless polkit is patched, potentially affecting authentication README.md:110-122

  • Root session management is disabled by default due to potential security implications turnstiled.conf.5.scd.in:99-104

  • Running as root increases the attack surface if vulnerabilities exist in the daemon or its PAM interaction.

  • Although it uses a modular backend design (e.g., shell scripts to launch user services), privilege separation is minimal; the main daemon itself does not drop privileges. 

  • There is no built-in privilege separation framework, unlike systems such as OpenSSH or systemd, which use sandboxing or process isolation. 

In practice, this means trust is placed in the correctness of the code and its PAM configuration, with no fine-grained containment.

Relying on the accuracy of code described by developers as a "work in progress" constitutes an unusual and risky security practice, as it introduces significant vulnerabilities due to incomplete testing, lack of peer review, and potential design flaws.
_https://github.com/chimera-linux/turnstile

The daemon needs to be running in some way. Usually you will spawn it as a system-wide service. It needs to be running as the superuser.
_https://github.com/chimera-linux/turnstile

Yes, the turnstiled deamon must run as root. This is explicitly documented and required for its core functionality.

Why Root is Required

The daemon performs privileged operations that necessitate root access:

  1. System Directory Management: Creates directories in /run for session tracking turnstiled.cc:1276-1298

  2. Runtime Directory Creation: Creates and chowns XDG_RUNTIME_DIR for users fs_utils.cc:55-124

  3. Socket Operations: Binds to system paths and sets up the control socket turnstiled.cc:890-943

  4. PAM Session Management: Establishes PAM sessions for users exec_utils.cc:316-322

Security Design

While running as root, the daemon implements:

  • Credential verification: Only UID 0 can create sessions turnstiled.cc:297-300

  • Privilege separation: Service managers run with dropped privileges exec_utils.cc:339-349

  • Root checks: Verifies it's running as root before privileged operations exec_utils.cc:310

The README explicitly states: "It needs to be running as the superuser" README.md:78-81 .

Notes

The daemon accepts connections via a permissive socket (0666) but enforces security through platform-specific credential checking, allowing the PAM module to communicate while maintaining access control turnstiled.cc:47 .

Any daemon running as root is inherently an attractive target for attackers. Turnstiled is no exception.

Security Reality

Turnstiled runs as root and accepts connections via a 0666 socket turnstiled.cc:47 , making it a high-value target. A compromise could allow session hijacking or privilege escalation.

Mitigations in Place

The daemon implements several security measures:

  1. Credential verification: Every connection is authenticated using platform-specific methods (SO_PEERCRED on Linux, LOCAL_PEERCRED on BSD, etc.) utils.cc:25-111

  2. Access control: Only UID 0 can create sessions turnstiled.cc:297-300

  3. Privilege separation: Service managers run with dropped privileges exec_utils.cc:339-349

  4. Resource limits: Sanitizes rlimits before PAM session setup exec_utils.cc:106-124

Attack Surface

The primary attack vectors would be:

  • Bugs in credential checking code

  • Protocol parsing vulnerabilities

  • Race conditions in process management

  • Memory corruption in the daemon

Notes

While the design is deliberate for PAM integration turnstiled.cc:40-46 , it does increase the attack surface. The security relies heavily on the correctness of the credential verification implementation. Regular security audits and keeping the daemon updated would be essential for any deployment.

The documentation does present a tension between the "work in progress" status and the security requirements.

What the Documentation States

The README explicitly labels Turnstile as "a work in progress effort" README.md:3-5 while simultaneously stating it "needs to be running as the superuser" README.md:78-81 . There is no explicit security warning about this combination.

Security Considerations in Code

The code does implement security measures:

  • Platform-specific credential verification for all connections

  • Only UID 0 can create sessions turnstiled.cc:297-300

  • Privilege separation for service managers

However, the design acknowledges accepting connections from non-root processes as a deliberate trade-off turnstiled.cc:40-46 .

Missing Documentation

What's absent from the documentation:

  • No explicit warning about running Work-In-Progress (WIP) software as root

  • No security audit status or review process mentioned

  • No clear statement about production readiness

Notes

This is a valid concern. While the code implements standard security practices for a session tracker, users should be aware that running any "work in progress" daemon as root carries inherent risks. The documentation could be more transparent about these risks and the current security posture of the project.

  • The project seems to place considerable faith in its users' understanding of the inherent risks involved.

  • The users are invited to trust developers who have not fully disclosed the security risks associated with running work-in-progress (WIP) software with root privileges.

Transparency is a key pillar of trust in software development. 

In cybersecurity, trust must be earned through demonstrable actions, not assumed or invited. When developers work on software that requires elevated privileges like root access, the stakes are significantly higher. A lack of transparency about known risks, especially in Work-In-Progress (WIP) software, undermines user safety and ethical responsibility.

Transparency was, of course, something of a guiding principle in Linux and open-source software, and one rather hopes it might linger on.

#11 Re: Freedom Hacks » Turnstile: security considerations and potential issues » 2026-02-10 01:44:48

Yes, it’s a bit like saying the kettle’s warm when it’s actually boiling — in Linux circles, flagging “security considerations” around a login manager isn’t just caution, it’s a quiet nod to the “don’t trust anything unless you’ve poked it with a stick” rule.

“This thing runs as root, touches logins, and isn’t covered in layers of armour. Best have a proper look under the bonnet before you let it near your front door.”

It’s not fearmongering — more a stiff upper lip way of saying:

“Assume nothing. Verify everything. Especially if it’s holding the keys.”

Downplaying security issues doesn’t calm nerves — it tends to do the opposite. People aren’t alarmed by the risks — they’re alarmed by the suggestion that someone isn’t taking them seriously. Ignoring concerns doesn’t make them vanish — it just makes people wonder what else is being ignored.

#12 Re: Freedom Hacks » Turnstile: security considerations and potential issues » 2026-02-09 23:36:55

"Turnstile: Security considerations and potential issues" might be a neutral and appropriate title.

It avoids alarmist language, doesn't assume intent or severity, and fairly signals a balanced review of possible concerns — exactly what one would expect from a technical or security assessment.

“Not dramatic, not dismissive — just a quiet invitation to have a proper look under the bonnet.”

#13 Re: Freedom Hacks » Turnstile: security considerations and potential issues » 2026-02-09 21:56:03

Your title “I don’t like turnstile” suggests a rather black-and-white take on things, doesn’t it? — as if one must choose between knowing every last detail and simply getting on with it.   

It’s not entirely fair to say it’s just a trade-off between knowledge and convenience — more like a quiet agreement to stop asking awkward questions in exchange for fewer flat tyres. 

“Perfectly sensible, really — so long as you don’t mind not knowing where the car’s actually going.”

Turnstile might be attractive to hackers — not because it’s weak, but because it’s sitting there with a sign saying “important things this way”.   

It’s a bit like fitting a fancy lock on a shed that’s full of tools: looks secure, but also tells the thief exactly where to start looking. 

So yes — it’s not a password manager, but it does run as root and handle login sessions. And if a hacker’s prowling about? 

“They’d be daft not to give it a poke.”

#14 Freedom Hacks » Turnstile: security considerations and potential issues » 2026-02-09 13:01:06

igorzwx
Replies: 8

One might very gently suggest that there are one or two lingering niggles about Turnstile — nothing major, mind you, more of a slight twitch of unease among the more cautious sorts.

It’s possible the word “login” itself sets off a faint, almost imperceptible alarm in certain ears — a bit like hearing the phrase “secure your bunker” during a light drizzle. Nothing to get your knickers in a twist over, but one can’t help noticing how the term does carry a certain… gravitas.

As the British might say: “Oh, it’s all perfectly fine — unless you’re the sort to worry about who’s watching the door. And the windows. And possibly the cat.”

Security Limitations and Polkit Integration

A key security limitation arises when polkit (PolicyKit) interacts with sessions managed by Turnstile.  

That means things like polkit may treat anything running within turnstile as a non-local session, and may not authenticate the processes. There is no way to get around this limitation outside of patching polkit, see Chimera's patches for reference. The alternative is not registering it at all, which will not make polkit work, as the session tracking logic in it will not be able to assign the processes to any UID and things will not work either.  Systemd user services are treated specially by systemd, as they are recognized by the service manager, but are explicitly not considered to be a part of any session (as they are shared); that means polkit will fall back to looking up whether any seated session for the UID exists.
_https://github.com/chimera-linux/turnstile

If pam_systemd or pam_elogind is used in the PAM configuration for Turnstile, the session may be registered without a proper seat. This causes polkit to treat the session as non-local, which can prevent proper authentication for certain operations. 

  • Processes running within such a session may be denied privileged actions even for legitimate users. 

  • There is no workaround without patching polkit itself, as noted in Chimera’s documentation. 

  • Not registering the session at all leads to similar issues, as polkit cannot map processes to a UID correctly. 

This creates a security-policy enforcement gap, especially in desktop environments where user privileges must be accurately determined.

Known Issues and Workarounds

Several functional and security-related issues have been reported:

  • Group membership not fully recognized: In some cases, tools like doas or sudo fail because secondary groups (e.g., wheel) are not properly propagated during session startup. This stems from the backend (e.g., dinit-userservd) launching services using only the UID and GID, without initializing the full group list.

  • DBus session exposure: Users have reported that Turnstile sometimes fails to export the DBus session environment, leading to broken user services that depend on D-Bus communication.  _https://github.com/chimera-linux/turnstile/issues/2

  • Graphical vs. text session ambiguity: Turnstile currently cannot distinguish between graphical (e.g., X11/Wayland) and text (TTY/SSH) sessions, which limits context-aware service management. 

These issues affect both usability and security, particularly in multi-user or privilege-escalation scenarios.

One could quietly observe that while the goal’s rather noble and the method quite elegant, the implementation does have a tendency to keep one busy on a Saturday evening — not in the way one might hope. 

It’s not entirely undocumented, of course — more of a light suggestion of instructions, really — leaving ample room for what one might call creative troubleshooting. And as for debugging or penetration tests? Well, let’s just say they’re best approached with a sober mind, unless one enjoys chasing ghosts in the logs with a glass of something strong. 

“It’s not broken — just… enthusiastically unpredictable.”

Here are the key security considerations and potential issues:

Socket Permissions and Access Control

  • The control socket uses permissive permissions (0666) allowing connections from non-root users turnstiled.cc:47 , but relies on platform-specific credentials checking to verify the peer's UID/GID/PID utils.cc:25-111 . This design requires proper implementation on each supported platform.

Privilege Separation

  • The daemon runs as root but service managers are executed with dropped privileges after proper setup exec_utils.cc:126-145

  • Resource limits are sanitized before PAM session setup to prevent privilege escalation exec_utils.cc:106-124

Process Management and Timeouts

  • Implements a 60-second timeout for service manager startup to prevent hanging logins turnstiled.cc:55 turnstiled.conf.5.scd.in:93-97

  • Service managers that fail to signal readiness are terminated and runtime directories are cleaned up turnstiled.cc:1043-1054

Resource Management

  • Runtime directories are created with proper ownership and permissions

  • Cleanup occurs on logout unless lingering is enabled turnstiled.cc:1071-1075

Known Limitations

  • When integrating with polkit, sessions may be treated as non-local
      unless polkit is patched, potentially affecting authentication README.md:110-122

  • Root session management is disabled by default due to potential security implications turnstiled.conf.5.scd.in:99-104

Notes

The codebase appears to implement standard security practices for a session tracker, including privilege separation, credential
verification, and resource cleanup. The main security considerations are around the permissive socket permissions (mitigated by credential checking) and the polkit integration limitations.

Yes, the Turnstile daemon runs as root, as confirmed by its documentation: the daemon must be spawned as a system-wide service with superuser privileges to manage session state and launch user service managers. 
While this is necessary for core functionality — such as tracking sessions, setting up XDG_RUNTIME_DIR, and spawning user services — it introduces inherent security considerations:

  • Running as root increases the attack surface if vulnerabilities exist in the daemon or its PAM interaction.

  • Although it uses a modular backend design (e.g., shell scripts to launch user services), privilege separation is minimal; the main daemon itself does not drop privileges. 

  • There is no built-in privilege separation framework, unlike systems such as OpenSSH or systemd, which use sandboxing or process isolation. 

In practice, this means trust is placed in the correctness of the code and its PAM configuration, with no fine-grained containment. As one might say:

It’s not alarming, per se — more of a "keep your fingers crossed and mind the gap" situation.

Ah, yes — having a daemon run as root is not so much a problem as it is handing the keys to the castle to a particularly excitable squirrel.

One might say:

“It’s perfectly fine — as long as you’re comfortable with the idea that if anything slightly goes awry, it won’t just trip over the rug… it’ll delete the rug, burn the house, and format the garden.”

Running as root means the daemon has full run of the system — great for trust, dreadful for security.  If there’s a bug, a misconfiguration, or a slightly overambitious typo, it’s not “oops, that broke a thing” — it’s “ah, there goes the entire machine.”

And if a clever sort on the internet does manage to pop in through a crack?

“Well, they’re not exactly breaking in — more like being handed the master key, a torch, and a note saying ‘Make yourself at home.’”

So yes — it’s technically functional. But from a security standpoint?

“Let’s just say it’s not paranoid to want a bit more formality before handing over total control.”

The good news is, you can enable debugging by editing /etc/turnstile/turnstiled.conf — it’s not exactly well-documented, mind you, but it does involve flipping the debug option to yes in the config file.

# Enable verbose debug logging  
debug = yes  
  
# Also send debug messages to stderr  
debug_stderr = yes

After that, just restart the turnstiled service, and the logs should start revealing a few of its more elusive secrets.

“Nothing too alarming — just don’t be surprised if the logs start reading like a mystery novel with half the pages missing.”

While the design of Turnstile does raise a few eyebrows, it’s not so much a flaw as a deliberate bit of juggling — trading some of the usual Linux security formalities for greater flexibility in how PAM ties in.

It’s a bit like rewiring the house to take a fancy new appliance: the lights still work, but you might wonder if the fuse box is up to code.

So, one might politely ask:

“Are we quite sure we want a Linux that’s light on tradition — or have we just thrown the front door key into the garden for convenience?”

#15 Re: Freedom Hacks » what about "turnstile" for user services? » 2026-02-09 01:15:29

Do you think it’s quite secure enough for Devuan users to try, or might there be a few little things to sort out first?

#16 Re: Freedom Hacks » what about "turnstile" for user services? » 2026-02-09 00:25:33

_https://github.com/chimera-linux/turnstile

Turnstile is a work in progress effort to create a session/login tracker to serve as a fully featured alternative to the logind subproject from systemd, and to provide a neutral API to both our session tracker and to logind itself.

What do you think "work in progress" means in this context?

It’s not entirely without problems:
_https://github.com/chimera-linux/turnstile/issues

#17 Re: Freedom Hacks » what about "turnstile" for user services? » 2026-02-08 14:15:11

It’s worth noting Turnstile is still a bit of a work-in-progress. It might be a touch temperamental, so don’t be surprised if it all goes a bit pear-shaped.

#18 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-06 16:55:38

Let’s assume it’s always worth reading the documentation, even if you presumably know everything. Have you had a go at reading up on ALSA over on the Devuan forum?

#19 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-06 11:17:56

devuan_dk_fan wrote:

Midi over web doesn't require any special configuration to my knowledge...
Soundfonts and software synths aren't necessary for midi over web.

Here is some info about the TomPlay mechanisms that I am using

Tomplay appears to be primarily a paid subscription service. Do they offer user support?

Tomplay is a commercial sheet music app... If you run into trouble using the Tomplay web interface on a Linux browser, why not get in touch with their team for help with account or score-related matters?

Tomplay help documentation
_https://tomplay.zendesk.com/hc/en-us/articles/9259936173980-I-want-to-connect-my-digital-instrument-to-my-device-using-Tomplay-What-should-I-do

Note that Tomplay, for the moment, does not support MIDI connection, all the audio backing tracks we offer are real recordings by professional musicians.

Why do you think you're having a "MIDI over web" issue? Tomplay doesn't use MIDI at all — it relies on real audio recordings, not MIDI signals, so there's no MIDI connection to troubleshoot in the first place.

#20 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-06 01:44:08

Music production - Gentoo Wiki
_https://wiki.gentoo.org/wiki/Music_production

MIDI - Gentoo Wiki
_https://wiki.gentoo.org/wiki/MIDI

MIDI controller guide - Gentoo Wiki
_https://wiki.gentoo.org/wiki/MIDI_controller_guide

AlsaMidi - Debian Wiki
_https://wiki.debian.org/AlsaMidi

#21 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-06 00:02:28

@greenjeans

Why do you think you're entitled to censor my posts and tell me what to do?

#22 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-05 23:23:48

The issue is, the Devuan community isn’t really focused on MIDI and audio production.

devuan_dk_fan wrote:

Very few people seem to have any interest, experience or technical knowledge about midi over web.

He’d probably be better off with Gentoo.

@brocashelm

Are you an expert in MIDI?

#23 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-05 23:04:09

Are you worried all Devuan users are going to rush off and switch to Gentoo just to ditch systemd?

#24 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-05 21:07:18

systemd isn't a problem  —  it's easy to remove. Gentoo's exactly what you need.

How to remove systemd from Gentoo and switch to OpenRC:

  1. Ensure OpenRC is ready: Confirm your kernel supports OpenRC and set USE="-systemd openrc" in /etc/portage/make.conf.

  2. Switch profile: Use eselect profile set to select a non-systemd (OpenRC) profile.

  3. Rebuild system: Run emerge --ask --update --deep --newuse @world to rebuild packages without systemd.

  4. Install eudev: Emerge sys-fs/eudev as a replacement for udev.

  5. Remove systemd: Run emerge --deselect sys-apps/systemd and emerge --depclean to remove systemd and unused dependencies.

  6. Reconfigure services: Use rc-update to enable necessary services under OpenRC.

  7. Update bootloader: Ensure the kernel command line does not include init=/usr/lib/systemd/systemd.

  8. Reboot: Test the new configuration.

NOTE: "Confirm your kernel supports OpenRC" means ensuring that your Linux kernel is configured with the necessary options to work correctly with the OpenRC init system, particularly when using gentoo-sources
When using sys-kernel/gentoo-sources, you should enable the following in your kernel configuration (make menuconfig):

Gentoo Linux --->
    [*] Gentoo Linux support
    [*]   Linux dynamic and persistent device naming (userspace devfs) support
    [*]   Select options required by Portage features
        Support for init systems, system and service managers  --->
          [*] OpenRC, runit and other script based systems and managers

This ensures essential Gentoo-specific features and OpenRC compatibility are built into the kernel. While OpenRC itself does not require special kernel features beyond standard POSIX compliance, enabling these options guarantees proper integration with Gentoo’s system layout and service management.

#25 Re: Desktop and Multimedia » [SOLVED] Devuan Excalibur install and Pipewire. » 2026-02-05 18:48:26

devuan_dk_fan wrote:

Very few people seem to have any interest, experience or technical knowledge about midi over web.

Yes, you'd probably be better off trying Gentoo or Arch Linux.

Board footer

Forum Software