Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/43228?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: sua: fix buffer overflow in sua_parse_gt() ......................................................................
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