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 1988283 - [covscan] gssd/krb5_util.c fix the newly introduced defects invalid_type
Summary: [covscan] gssd/krb5_util.c fix the newly introduced defects invalid_type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nfs-utils
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Steve Dickson
QA Contact: Yongcheng Yang
URL:
Whiteboard:
Depends On:
Blocks: 2025386
TreeView+ depends on / blocked
 
Reported: 2021-07-30 09:20 UTC by Yongcheng Yang
Modified: 2022-05-10 16:34 UTC (History)
1 user (show)

Fixed In Version: nfs-utils-2.3.3-48.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1999476 2025386 (view as bug list)
Environment:
Last Closed: 2022-05-10 15:20:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2022:2025 0 None None None 2022-05-10 15:21:01 UTC

Description Yongcheng Yang 2021-07-30 09:20:53 UTC
Description of problem:
Then new version nfs-utils-2.3.3-44.el8 via bz1961056 introduces 2 more defects which looks like need to be fix. Please help have a look and check them.

https://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/76192/206104/#defects

The first one:
 1. nfs-utils-2.3.3/utils/gssd/krb5_util.c:651: invalid_type: Argument "outhost" to format specifier "%0lx" was expected to have type "unsigned long" but has type "char *". 
 1. nfs-utils-2.3.3/utils/gssd/krb5_util.c:650: missing_argument: No argument for format specifier "%s". 

#   648|   
#   649|   	if (get_verbosity() && strcmp(inhost, outhost))
#   650|-> 		printerr(1, "%s(0x%0lx): inhost '%s' different than outhost'%s'\n", 
#   651|->   			inhost, outhost);
#   652|   


The second one:
 1. nfs-utils-2.3.3/utils/gssd/krb5_util.c:400: incompatible_cast: Pointer "&ple->endtime" points to an object whose effective type is "int" (32 bits, signed) but is dereferenced as a wider "long" (64 bits, signed). This may lead to memory corruption. 

#   398|   	if (ple->ccname && ple->endtime > now && !nocache) {
#   399|   		printerr(3, "%s(0x%lx): Credentials in CC '%s' are good until %s",
#   400|-> 			 __func__, tid, ple->ccname, ctime((time_t *)&ple->endtime));
#   401|   		code = 0;
#   402|   		pthread_mutex_unlock(&ple_lock);


Version-Release number of selected component (if applicable):
nfs-utils-2.3.3-46.el8

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Steve Dickson 2021-11-03 19:41:22 UTC
commit cfe41d6f06af0e7744c1ca30503f93d28aca4d8b
Author: NeilBrown <neilb>
Date:   Tue Sep 21 12:47:10 2021 -0400

    gssd: fix crash in debug message.

Comment 4 Yongcheng Yang 2021-11-10 02:15:31 UTC
(In reply to Yongcheng Yang from comment #0)
> Description of problem:
> Then new version nfs-utils-2.3.3-44.el8 via bz1961056 introduces 2 more
> defects which looks like need to be fix. Please help have a look and check
> them.
> 
> https://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/76192/206104/#defects
> 

Compared with the new version nfs-utils-2.3.3-48.el8:
https://cov01.lab.eng.brq.redhat.com/covscanhub/waiving/83005/225919/#defects

The (Defect type) "PRINTF_ARGS" warning have been fixed now.

But
> The second one:
>  1. nfs-utils-2.3.3/utils/gssd/krb5_util.c:400: incompatible_cast: Pointer
> "&ple->endtime" points to an object whose effective type is "int" (32 bits,
> signed) but is dereferenced as a wider "long" (64 bits, signed). This may
> lead to memory corruption. 
> 
> #   398|   	if (ple->ccname && ple->endtime > now && !nocache) {
> #   399|   		printerr(3, "%s(0x%lx): Credentials in CC '%s' are good until
> %s",
> #   400|-> 			 __func__, tid, ple->ccname, ctime((time_t *)&ple->endtime));
> #   401|   		code = 0;
> #   402|   		pthread_mutex_unlock(&ple_lock);
> 
The above "INCOMPATIBLE_CAST" one is still exist.

Maybe I can go ahead to verify this bug and track the remaining issue in another bug.

Comment 5 Yongcheng Yang 2021-11-22 03:30:05 UTC
(In reply to Yongcheng Yang from comment #4)
...
> The (Defect type) "PRINTF_ARGS" warning have been fixed now.

I'm moving this one to VERIFIED for now.

...
> The above "INCOMPATIBLE_CAST" one is still exist.

Just filed Bug 2025386 to track it.

Comment 7 errata-xmlrpc 2022-05-10 15:20:51 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 (nfs-utils 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/RHBA-2022:2025


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