dpll: sanitize possible null pointer dereference in dpll_pin_parent_pin_set()
authorJiri Pirko <jiri@nvidia.com>
Mon, 11 Dec 2023 08:37:58 +0000 (09:37 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Dec 2023 00:20:54 +0000 (16:20 -0800)
commit65c95f78917ea6fa7ff189a2c19879c4fe161873
tree7d28601fb11ebde6292d221fd7872286247aa43b
parent154bb2fa4810e6196561ecc0f0c36ad61c770b6e
dpll: sanitize possible null pointer dereference in dpll_pin_parent_pin_set()

User may not pass DPLL_A_PIN_STATE attribute in the pin set operation
message. Sanitize that by checking if the attr pointer is not null
and process the passed state attribute value only in that case.

Reported-by: Xingyuan Mo <hdthky0@gmail.com>
Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://lore.kernel.org/r/20231211083758.1082853-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/dpll/dpll_netlink.c