RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2169985 - add krb5 principal failed with specific datetime string in pwexpire option (s390x, coredump)
Summary: add krb5 principal failed with specific datetime string in pwexpire option (s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: krb5
Version: 9.2
Hardware: s390x
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Julien Rische
QA Contact: Filip Dvorak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-15 10:23 UTC by Filip Dvorak
Modified: 2023-05-09 10:41 UTC (History)
2 users (show)

Fixed In Version: krb5-1.20.1-8.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:25:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github krb5 krb5 pull 1290 0 None open Fix meridian type in kadmin datetime parser (s390x) 2023-02-21 09:53:00 UTC
Red Hat Issue Tracker FREEIPA-9457 0 None None None 2023-02-15 10:24:15 UTC
Red Hat Issue Tracker RHELPLAN-148705 0 None None None 2023-02-15 10:24:19 UTC
Red Hat Product Errata RHSA-2023:2570 0 None None None 2023-05-09 08:25:29 UTC

Description Filip Dvorak 2023-02-15 10:23:42 UTC
Description of problem:
Adding of a new user principal with a specific datetime string into krb5kdc failed on s390x.

Version-Release number of selected component (if applicable):
krb5-server-1.20.1-5.el9.s390x
RHEL9.2

How reproducible:


Steps to Reproduce:
1. set krb5 (kdc.conf was in a default conf.)

   sed -i "s/\[libdefaults\]/[libdefaults]\n default_realm = TEST.COM/" /etc/krb5.conf
   sed -i "s/\[realms\]/[realms]\n TEST.COM = {\n  kdc = $KDC_HostName\n  admin_server = $KDC_HostName\n }/" /etc/krb5.conf
   sed -i "s/\[domain_realm\]/[domain_realm]\n .$KDC_DomainName = TEST.COM\n $KDC_DomainName = TEST.COM/" /etc/krb5.conf

2. Create kdc db
kdb5_util create -s -r TEST.COM -P <passwd>

3. add user into db
kadmin.local -q "addprinc -pwexpire \"January 23, 2030 08:05am\" -pw <passwd> user"

Actual results:
kadmin.local:  addprinc -pwexpire "January 23, 2030 08:05am" -pw Secret123 user_whole_datetime.COM
Aborted (core dumped)


Expected results:
user should be created

Comment 2 Julien Rische 2023-02-15 10:54:01 UTC
The cause seems to be an invalid value assigned to yyMeridian in the Yacc-generated source file:

===
Hardware watchpoint 2: yyMeridian

Old value = MER24
New value = (MERpm | unknown: 0x4)
getdate_yyparse () at y.tab.c:1428
1428        break;
(gdb) l
1423                yyMinutes = (yyvsp[-1].Number);
1424                yySeconds = 0;
1425                yyMeridian = (yyvsp[0].Meridian);
1426            }
1427    #line 1428 "y.tab.c"
1428        break;
1429
1430      case 12: /* time: tUNUMBER ':' tUNUMBER tSNUMBER  */
1431    #line 231 "getdate.y"
1432                                             {
(gdb) bt
#0  getdate_yyparse () at y.tab.c:1428
#1  0x000002aa00009fc8 in get_date_rel (p=<optimized out>, nowtime=<optimized out>) at getdate.y:950
#2  0x000002aa0000acfa in parse_date (now=<optimized out>, str=0x3ffffffa24a "January 23, 2030 08:05am") at kadmin.c:162
#3  kadmin_parse_princ_args (argc=<optimized out>, argv=0x2aa000bb4e0, oprinc=0x3ffffff9320, mask=0x3ffffff9318, pass=<optimized out>, randkey=<optimized out>, nokey=<optimized out>, ks_tuple=<optimized out>, n_ks_tuple=<optimized out>, caller=<optimized out>) at kadmin.c:1039
#4  0x000002aa0000b0e8 in kadmin_addprinc (argc=<optimized out>, argv=<optimized out>) at kadmin.c:1209
#5  0x000003fff7e82922 in really_execute_command () from /lib64/libss.so.2
#6  0x000003fff7e837ba in ss_execute_line () from /lib64/libss.so.2
#7  0x000002aa00004fd4 in main (argc=<optimized out>, argv=<optimized out>) at ss_wrapper.c:66
===

Comment 5 Julien Rische 2023-02-21 09:53:00 UTC
The reason was an invalid type for meridian suffices in the YACC file. This regression was probably introduced in:
https://github.com/krb5/krb5/commit/d3356bc42191c1896ab06835a2fb245e00471420

Upstream pull request:
https://github.com/krb5/krb5/pull/1290

Comment 12 errata-xmlrpc 2023-05-09 08:25:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: krb5 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2570


Note You need to log in before you can comment on or make changes to this bug.