Attention is currently required from: fixeria, laforge, lynxis lazus, pespin.

dexter uploaded patch set #2 to this change.

View Change

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

The change is no longer submittable: Code-Review and Verified are unsatisfied now.

gprs_sndcp_xid: double check buffer size after writing SAPIs

The function encode_pcomp_applicable_sapis writes the applicable
SAPIs to the output buffer. For this it requires 2 bytes. After
that, each encoder function writes the remaining information to
the buffer. The check at the beginning of each encoder function
is sufficient to ensure that the buffer is large enough.

However, this remains only true in case the number of bytes
that encode_pcomp_applicable_sapis writes is 2. If there are
changes to the spec or similar, the function might write more
than 2 bytes. So let's place an additional length check to be
on the secure side.

Change-Id: I059c903885e21215ad1e6b835f34db2c5f70d87a
Related: OS#7095
---
M src/sgsn/gprs_sndcp_xid.c
1 file changed, 20 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/68/43968/2

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

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I059c903885e21215ad1e6b835f34db2c5f70d87a
Gerrit-Change-Number: 43968
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-CC: pespin <pespin@sysmocom.de>
Gerrit-Attention: laforge <laforge@osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Attention: pespin <pespin@sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis@fe80.eu>