Attention is currently required from: bucketking657, laforge, pespin. Hello Jenkins Builder, fixeria, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/44142?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review-1 by pespin, Verified+1 by Jenkins Builder Change subject: gsm: fix one-byte overflow in BCD number encoders ...................................................................... gsm: fix one-byte overflow in BCD number encoders gsm48_encode_bcd_number() checked only the L octet against max_len, the size of bcd_lv, but it also writes the L octet itself, so a number one or two digits over the spec maximum wrote one byte past the buffer. Count the L octet in the check, and compute the length in an int so that it cannot wrap. Add tests. osmo-sgsn passes max_len 8 for the 9-byte IMEISV, which needs Change-Id Ied06aa05ee6850ec0df34a51cdce6df12e0b594c first. Fixes: OS#7126 Change-Id: I99521d30896f3d58ecfb28de290bce7e31388fca --- M src/gsm/gsm48_ie.c M tests/gsm0408/gsm0408_test.c M tests/gsm0408/gsm0408_test.ok M tests/gsm0808/gsm0808_test.c M tests/gsm0808/gsm0808_test.ok 5 files changed, 137 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/44142/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44142?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I99521d30896f3d58ecfb28de290bce7e31388fca Gerrit-Change-Number: 44142 Gerrit-PatchSet: 2 Gerrit-Owner: bucketking657 <joshuashilts@gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: bucketking657 <joshuashilts@gmail.com>