Attention is currently required from: fixeria, laforge.

fixeria uploaded patch set #2 to this change.

View Change

The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder

sua: fix buffer overflow in sua_parse_gt()

RFC 3868 does not impose a limit on the Number of Digits, so ideally
we should be able to parse up to 255 digits. However, our
gt->digits[] can only fit up to 31 digits + a terminating NUL.

Cap num_digits to the size of gt->digits before decoding and parse
as much as we can, returning -ENOSPC if not all digits fit. Add a
unit test covering both the exact-fit and oversized num_digits cases.

Change-Id: I59f601f2d8706748797c802f0f09887e4b9ba31f
Reported-By: 3ntr0py1337
Fixes: OS#7046
---
M src/sua.c
M tests/xua/xua_test.c
M tests/xua/xua_test.ok
3 files changed, 42 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/28/43228/2

To view, visit change 43228. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I59f601f2d8706748797c802f0f09887e4b9ba31f
Gerrit-Change-Number: 43228
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-CC: pespin <pespin@sysmocom.de>
Gerrit-Attention: laforge <laforge@osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>