]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.
authorNeilBrown <neilb@suse.de>
Fri, 22 May 2020 02:01:33 +0000 (12:01 +1000)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 28 May 2020 22:15:00 +0000 (18:15 -0400)
commitd47a5dc2888fd1b94adf1553068b8dad76cec96c
treebde23de0f324e1d5fe2e8bc81625df6ca7d3d39f
parentf45db2b909c7e76f35850e78f017221f30282b8e
sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.

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: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/auth_gss/svcauth_gss.c