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]>
Fri, 17 Oct 2025 22:47:29 +0000 (00:47 +0200)
commit2a76abc5442e3f74d95b4caa9bb57e5488fc132e
tree6c8441286783afc64358db9707d1287608402de1
parent4b907e69ea58fc0ba35fd1755dc4ba22262af3a4
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]>
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/patches/102-fix-missing-prototypes-warning.patch
package/kernel/lantiq/ltq-ptm/patches/103-add-missing-header-mod_devicetable.h.patch
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c