EAP-pwd peer: Fix last fragment length validation

All but the last fragment had their length checked against the remaining
room in the reassembly buffer. This allowed a suitably constructed last
fragment frame to try to add extra data that would go beyond the buffer.
The length validation code in wpabuf_put_data() prevents an actual
buffer write overflow from occurring, but this results in process
termination. (CVE-2015-5315)

Signed-off-by: Jouni Malinen <j@w1.fi>
Git-commit: 8057821706784608b828e769ccefbced95591e50
Git-repo: git://w1.fi/srv/git/hostap.git
Change-Id: I565a55bd5a672be60af5b11dac4e78aa421d4772
CRs-Fixed: 937515
1 file changed