Page MenuHomeFreeBSD

ktls: Fix an off-by-one bug in tls13_find_record_type()
AcceptedPublic

Authored by markj on Thu, Sep 17, 4:54 PM.
Tags
None
Referenced Files
F173074083: D59767.id186976.diff
Wed, Sep 23, 9:32 AM
F173037882: D59767.diff
Wed, Sep 23, 2:01 AM
Unknown Object (File)
Tue, Sep 22, 10:53 AM
Unknown Object (File)
Tue, Sep 22, 6:02 AM
Unknown Object (File)
Mon, Sep 21, 6:52 PM
Unknown Object (File)
Mon, Sep 21, 6:24 PM
Unknown Object (File)
Mon, Sep 21, 4:23 PM
Unknown Object (File)
Sun, Sep 20, 5:14 PM
Subscribers

Details

Reviewers
jhb
gallatin
Summary

If the entire plaintext is zero-filled, the backwards walk in
tls13_find_record_type() would return the offset of the last byte of the
TLS header. This causes an underflow when decrypting, resulting in a
null pointer dereference.

Fix the condition and add a regression test.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77027
Build 73910: arc lint + arc unit