ltq-ptm: Fix unprivileged local user memory read and write
authorHauke Mehrtens <[email protected]>
Mon, 13 Oct 2025 22:32:26 +0000 (00:32 +0200)
committerHauke Mehrtens <[email protected]>
Sat, 18 Oct 2025 12:25:03 +0000 (14:25 +0200)
commite001b31163a77683ee741d169f794cfa50926f37
treef8a4ae776e9c4fb1fd1b7f8d072384cd1c3b462b
parentfe50cfded0a6f10c871f543eefa8f197d0f9038f
ltq-ptm: Fix unprivileged local user memory read and write

Use the copy_from_user() and copy_to_user() functions for accessing
memory provided by the user in the ptm netdev iotls.
In addition also check for root permission before executing ioctl.

Suggested-by: Stanislav Fort from Aisle Research
Reported-by: Stanislav Fort from Aisle Research
Signed-off-by: Hauke Mehrtens <[email protected]>
(cherry picked from commit 2a76abc5442e3f74d95b4caa9bb57e5488fc132e)
package/kernel/lantiq/ltq-ptm/patches/100-fix-compilation-warning-debugfs.patch
package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c