]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commit32373641fa638da7e90d2cac68a2046f35bb8c81
treedd37775456b496943dadba2d7a3ce94e2051ebe2
parent66834f46705fcf0b7e4d04a47ec8a7ed99d8c087
sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.

BugLink: https://bugs.launchpad.net/bugs/1885023
commit d47a5dc2888fd1b94adf1553068b8dad76cec96c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
net/sunrpc/auth_gss/svcauth_gss.c