linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] SUNRPC: simplify auth_unix.
@ 2018-12-21  9:10 Dan Carpenter
  2019-01-07  6:53 ` [PATCH] SUNRPC: remove pointless test in unx_match() NeilBrown
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2018-12-21  9:10 UTC (permalink / raw)
  To: neilb; +Cc: linux-nfs

Hello NeilBrown,

This is a semi-automatic email about new static checker warnings.

The patch 394f319df78e: "SUNRPC: simplify auth_unix." from Dec 3, 
2018, leads to the following Smatch complaint:

    net/sunrpc/auth_unix.c:90 unx_match()
    warn: variable dereferenced before check 'acred->cred' (see line 87)

net/sunrpc/auth_unix.c
    86	
    87		if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred->fsgid))
                                                  ^^^^^^^^^^^
New dereference

    88			return 0;
    89	
    90		if (acred->cred && acred->cred->group_info != NULL)
                    ^^^^^^^^^^^
But the old code checked for NULL

    91			groups = acred->cred->group_info->ngroups;
    92		if (groups > UNX_NGROUPS)

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-21 22:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21  9:10 [bug report] SUNRPC: simplify auth_unix Dan Carpenter
2019-01-07  6:53 ` [PATCH] SUNRPC: remove pointless test in unx_match() NeilBrown
2019-02-21 22:39   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).