aboutsummaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2019-01-18 12:56:20 +0100
committerMoyster <oysterized@gmail.com>2019-05-02 14:30:26 +0200
commit87c0253d9aea99b9ef791e94e55ec26a111c561e (patch)
treebdd5c6d90de73532993c84d09e7fb0c132f2dea1 /include/linux/workqueue.h
parent92807c917fd2dc3a4b2038176716e8fe31dc4514 (diff)
Bluetooth: Check L2CAP option sizes returned from l2cap_get_conf_opt
commit af3d5d1c87664a4f150fcf3534c6567cb19909b0 upstream. When doing option parsing for standard type values of 1, 2 or 4 octets, the value is converted directly into a variable instead of a pointer. To avoid being tricked into being a pointer, check that for these option types that sizes actually match. In L2CAP every option is fixed size and thus it is prudent anyway to ensure that the remote side sends us the right option size along with option paramters. If the option size is not matching the option type, then that option is silently ignored. It is a protocol violation and instead of trying to give the remote attacker any further hints just pretend that option is not present and proceed with the default values. Implementation following the specification and its qualification procedures will always use the correct size and thus not being impacted here. To keep the code readable and consistent accross all options, a few cosmetic changes were also required. Change-Id: Ie90c28b01b4fab9b26371ed852fec6c51322aed3 Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions