freeipa/ipatests/prci_definitions
Alexander Bokovoy 404fe1018e rpcserver: validate Kerberos principal name before running kinit
Do minimal validation of the Kerberos principal name when passing it to
kinit command line tool. Also pass it as the final argument to prevent
option injection.

Accepted Kerberos principals are:
 - user names, using the following regexp
   (username with optional @realm, no spaces or slashes in the name):
   "(?!^[0-9]+$)^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?@?[a-zA-Z0-9.-]*$"

 - service names (with slash in the name but no spaces). Validation of
   the hostname is done. There is no validation of the service name.

The regular expression above also covers cases where a principal name
starts with '-'. This prevents option injection as well.

This fixes CVE-2024-1481

Fixes: https://pagure.io/freeipa/issue/9541

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
2024-02-21 17:07:33 -05:00
..
gating.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
nightly_latest_389ds.yaml Nightly tests: test on f38 and f39 2024-01-12 18:46:41 -05:00
nightly_latest_pki.yaml Nightly tests: test on f38 and f39 2024-01-12 18:46:41 -05:00
nightly_latest_selinux.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
nightly_latest_sssd.yaml Nightly tests: test on f38 and f39 2024-01-12 18:46:41 -05:00
nightly_latest_testing_selinux.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
nightly_latest_testing.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
nightly_latest.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
nightly_previous.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
nightly_rawhide.yaml rpcserver: validate Kerberos principal name before running kinit 2024-02-21 17:07:33 -05:00
prci_checker.py doc: Use case examples for PR-CI checker tool 2023-02-18 09:02:27 +01:00
prci_jobs_spec.yaml doc: Use case examples for PR-CI checker tool 2023-02-18 09:02:27 +01:00
temp_commit.yaml Nightly tests: test on f38 and f39 2024-01-12 18:46:41 -05:00