linux/drivers/platform/surface
Maximilian Luz e94a26504f platform/surface: aggregator_cdev: Add comments regarding unchecked allocation size
CI static analysis complains about the allocation size in payload and
response buffers being unchecked. In general, these allocations should
be safe as the user-input is u16 and thus limited to U16_MAX, which is
only slightly larger than the theoretical maximum imposed by the
underlying SSH protocol.

All bounds on these values required by the underlying protocol are
enforced in ssam_request_sync() (or rather the functions called by it),
thus bounds here are only relevant for allocation.

Add comments explaining that this should be safe.

Reported-by: Colin Ian King <colin.king@canonical.com>
Fixes: 178f6ab77e ("platform/surface: Add Surface Aggregator user-space interface")
Addresses-Coverity: ("Untrusted allocation size")
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20210111154851.325404-3-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-01-13 10:30:21 +01:00
..
aggregator platform/surface: aggregator: Add dedicated bus and device type 2021-01-07 00:06:39 +01:00
Kconfig platform/surface: Add Surface ACPI Notify driver 2021-01-07 00:06:39 +01:00
Makefile platform/surface: Add Surface ACPI Notify driver 2021-01-07 00:06:39 +01:00
surface3_button.c platform/surface: Move Surface 3 Button driver to platform/surface 2020-10-27 12:51:24 +01:00
surface3_power.c platform/surface: Move Surface 3 Power OpRegion driver to platform/surface 2020-10-27 12:51:24 +01:00
surface3-wmi.c
surface_acpi_notify.c platform/surface: fix potential integer overflow on shift of a int 2021-01-13 10:25:10 +01:00
surface_aggregator_cdev.c platform/surface: aggregator_cdev: Add comments regarding unchecked allocation size 2021-01-13 10:30:21 +01:00
surface_gpe.c platform/surface: surface_gpe: Fix non-PM_SLEEP build warnings 2021-01-04 15:54:27 +01:00
surfacepro3_button.c platform/surface: Move Surface Pro 3 Button driver to platform/surface 2020-10-27 12:51:24 +01:00