Commit: 800257a5aae104ba73c5d299cd350643610998b0
Parent: b9085d74f19f693a91db85f3ac4be271e02e97af
Author: Matias Karhumaa <matias.karhumaa@gmail.com>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2018-10-18 19:10:32
Tree: a093ef0b459b8d2283db0d50675889478a7e488d

btmon: fix segfault caused by integer underflow Fix segfault caused by integer underflow in decode_data_element function of monitor/sdp.c. Fix is to check that elemlen is not bigger than size before subtracting elemlen from size. Also search_bytes + attr_bytes should not be bigger than frame->size. This bug can be triggered locally reading malformed btmon capture file and also over the air by sending specifically crafted SDP Search Attribute response to device running btmon. This bug was found by fuzzing btmon with AFL.

Diffstat

M monitor/sdp.c | 10 ++++++++++

1 files changed, 10 insertions(+), 0 deletions(-)

View Full Diff | Patch