Commit 7a42e82e authored by NeilBrown's avatar NeilBrown Committed by Yang Yingliang
Browse files

sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.

hulk inclusion
category: bugfix
bugzilla: NA
CVE: CVE-2020-12656

---------------------------

There is no valid case for supporting duplicate pseudoflavor
registrations.
Currently the silent acceptance of such registrations is hiding a bug.
The rpcsec_gss_krb5 module registers 2 flavours but does not unregister
them, so if you load, unload, reload the module, it will happily
continue to use the old registration which now has pointers to the
memory were the module was originally loaded.  This could lead to
unexpected results.

So disallow duplicate registrations.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=206651


Cc: stable@vger.kernel.org (v2.6.12+)
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarWenan Mao <maowenan@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 4e6cd5e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment