Bug 56333 - univention-backup2master calls ldapmodify with ldap.secret visible in process list
univention-backup2master calls ldapmodify with ldap.secret visible in process...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: backup2master
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-5-errata
Assigned To: Florian Best
Arvid Requate
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-07-17 18:24 CEST by Florian Best
Modified: 2023-11-06 15:19 CET (History)
0 users

See Also:
What kind of report is it?: Security Issue
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Security
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2023-07-17 18:24:18 CEST
univention-backup2master calls ldapmodify with ldap.secret visible in process list:

management/univention-ldap/univention-backup2master:  ldapmodify -x -D "cn=admin,$ldap_base" -w "$(cat /etc/ldap.secret)" -f "$temp_file"
management/univention-ldap/univention-backup2master:ldapmodify -x -D "cn=admin,$ldap_base" -w "$(cat /etc/ldap.secret)" -f "$temp_file"
management/univention-ldap/univention-backup2master:ldapdelete -x -D "cn=admin,$ldap_base" -w "$(cat /etc/ldap.secret)" "krb5PrincipalName=ldap/${old_ldap_master}@${kerberos_realm},cn=kerberos,${ldap_base}"
management/univention-ldap/test/listner-notifier-test:          ldapmodrdn -x -D "cn=admin,$ldap_base" -w "$(cat /etc/ldap.secret)" "$dn" "$rdn=Object$string1"
management/univention-ldap/test/listner-notifier-test:          ldapmodrdn -x -D "cn=admin,$ldap_base" -w "$(cat /etc/ldap.secret)" -r "$rdn=Object$string1,cn=$cn,$ldap_base" "$rdn=Objectxxx$string2"

→ instead "-y /etc/ldap.secret" should be used.
Comment 1 Florian Best univentionstaff 2023-10-25 16:46:33 CEST
backup2master now uses -y "$password_file".

univention-ldap.yaml
e9e4a4871fcd | fix(backup2master): do not leak password in process list

univention-ldap (16.0.13-5)
e9e4a4871fcd | fix(backup2master): do not leak password in process list
Comment 2 Arvid Requate univentionstaff 2023-10-26 14:35:08 CEST
Verified:
* Code review
* Package update
* Advisory