]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
authorChristoph Hellwig <hch@lst.de>
Tue, 1 Aug 2023 17:35:44 +0000 (19:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Sep 2023 20:25:29 +0000 (21:25 +0100)
commit784a1fd76b74d4c6849a7f2cd8cd3b48c56642bb
treeed3de8a4796ea24656945e9d75ee4d5365f460d7
parentf2114d34d6bbb93cdba6bc531a38bc5a9e96777b
modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules

commit 9011e49d54dcc7653ebb8a1e05b5badb5ecfa9f9 upstream.

It has recently come to my attention that nvidia is circumventing the
protection added in 262e6ae7081d ("modules: inherit
TAINT_PROPRIETARY_MODULE") by importing exports from their proprietary
modules into an allegedly GPL licensed module and then rexporting them.

Given that symbol_get was only ever intended for tightly cooperating
modules using very internal symbols it is logical to restrict it to
being used on EXPORT_SYMBOL_GPL and prevent nvidia from costly DMCA
Circumvention of Access Controls law suites.

All symbols except for four used through symbol_get were already exported
as EXPORT_SYMBOL_GPL, and the remaining four ones were switched over in
the preparation patches.

Fixes: 262e6ae7081d ("modules: inherit TAINT_PROPRIETARY_MODULE")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/module/main.c