[openbsc 2/3] gprs_llc: Prevent llme_alloc/lle_init from reading invalid memory

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Daniel Willmann daniel at totalueberwachung.de
Fri Jun 27 15:05:48 UTC 2014


Make the llc_default_params structure from which data is initialized
large enough. Otherwise address sanitizer complains with out-of-bounds
reads.
---
 openbsc/src/gprs/gprs_llc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index 70fe9dd..e6b1f07 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -84,7 +84,7 @@ static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx)
 
 
 /* Section 8.9.9 LLC layer parameter default values */
-static const struct gprs_llc_params llc_default_params[] = {
+static const struct gprs_llc_params llc_default_params[NUM_SAPIS] = {
 	[1] = {
 		.t200_201	= 5,
 		.n200		= 3,
-- 
1.8.4.2





More information about the OpenBSC mailing list