7.4 update: security hardening, #44/#61/#93, Ubuntu 26.04 compat#94
7.4 update: security hardening, #44/#61/#93, Ubuntu 26.04 compat#94hermanntoast wants to merge 9 commits into
Conversation
Usernames, hostnames and policy names were embedded into LDAP filters via f-strings without escaping, allowing LDAP filter injection through crafted AD principal names. All values now go through ldap.filter.escape_filter_chars().
sudoTools is callable NOPASSWD by any member of 'domain users' and forwards the --path and --name arguments into shares._mountShare() as root. The share name was used unvalidated to build the mountpoint, so '--name ../../..' could escape the per-user base dir and mount an attacker-controlled server to an arbitrary location (root mkdir + mount.cifs). _mountShare() now validates the network path and share name and verifies the resolved mountpoint stays inside the user's base directory. Also fixes the sudoTools mount-share success check (a (False, None) tuple is truthy) and wraps mount.cifs in 'timeout' so an unreachable server cannot hang boot/login (part of #61).
… paths (#93) install-printer (reachable as root via sudoTools by any domain user) now rejects unsafe device-uri schemes (notably file://, which would allow writing to an arbitrary file as root) and invalid printer names. Additionally resolve lpadmin/lpstat to absolute paths so printers are still uninstalled on logout, where the PAM environment only provides PATH=/bin:/usr/bin (#93).
…le (#61) pullKerberosTicketForComputerAccount() gained an optional timeout, and onBoot now pulls the ticket with a 5s timeout. Together with the mount.cifs timeout, an unreachable domain controller / sysvol no longer stalls the boot process.
Drop the deprecated 'client use spnego' smb.conf option (SPNEGO is always used in modern Samba and the option triggers warnings), and make SSSD version parsing tolerant of packaging suffixes (e.g. '2.10.0-1ubuntu1') so the krb5_child capability check keeps working on newer distributions.
New homes are created mode 0700 so users can no longer read each other's data via an explicit path. Incorporates PR #44 by dorianim.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #94 +/- ##
==========================================
+ Coverage 61.82% 65.09% +3.26%
==========================================
Files 18 18
Lines 1548 1607 +59
==========================================
+ Hits 957 1046 +89
+ Misses 591 561 -30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Version scheme switched to 7.4.x so the linuxmuster (lmn) version is obvious from the package version.
a32ba1f to
3152362
Compare
🧪 Live test on real hardware — Ubuntu 26.04 LTS against linuxmuster.net 7.4This branch was built into a Test environment
Installation & compatibility
AD login (one fresh user per role)
Printer logout (#93)
Security fixes (verified on the real machine)
Conclusion: On Ubuntu 26.04 with Samba 4.23, the 7.4.0 client works fully against a linuxmuster.net 7.4 server — domain join, AD login (student/teacher/staff), shares, hooks and printers all function, and every security fix holds up live. |
Overview
Collected 7.4 (
lmn74) update bundling a security audit follow-up, two open bug fixes, one open PR, and Ubuntu 26.04 / Samba 4.2x compatibility. Version bumped to7.4.0 lmn74.Security fixes
The
sudoToolshelper is callableNOPASSWDby every member ofdomain users(seeetc/sudoers.d/99-linuxmuster-linuxclient7), so its arguments are an unprivileged→root trust boundary.mount-share --nameflowed unvalidated into the mountpoint (/home/{user}/media/{name}), so--name ../../../..escaped the per-user base and let any domain usermkdiras root and mount an attacker-controlled SMB server at an arbitrary path.shares._mountShare()now validates the network path and share name and confirms the resolved mountpoint stays inside the user's base dir. Also fixes themount-sharesuccess check (the oldif tuple:was always truthy).install-printerargument injection. Restricted device-uri schemes to a safe allow-list (notably rejectingfile://, which would let a domain user write to any file as root) and validated the printer name.ldap.filter.escape_filter_chars().Bug fixes
PATH=/bin:/usr/binandlpadminlives in/usr/sbin.lpadmin/lpstatare now resolved to absolute paths.onBoothook could block boot when the DC/sysvol was unreachable. Kerberos ticket retrieval now uses a 5 s timeout andmount.cifsis wrapped intimeout.Incorporated PR
umask=077so users cannot read each other's data.Ubuntu 26.04 / Samba 4.2x compatibility
client use spnegosmb.conf option (SPNEGO is always used in modern Samba; the option triggers warnings).2.10.0-1ubuntu1) so thekrb5_childcapability check keeps working.mount.cifstimeout above also hardens boot on new stacks.Tests
make tests— 110 passed (99 previously + 11 new covering the validation, LDAP escaping, timeout and version-parsing paths).