[PATCH] libosmocore osmo_revbytebits_buf stack trashing

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/.

noselasd at fiane.dyndns.org noselasd at fiane.dyndns.org
Wed Jan 2 23:58:01 UTC 2013


Hi,
The second loop in osmo_revbytebits_buf() in src/bits.c grabs 4 bytes
each iteration, which can easily go past the supplied input in some
cases. Compiled with -fstack-protector , I get a "stack smashing 
detected" in the bits test.

Attached patch should deal with that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osmo_revbytebits_buf-check.patch
Type: text/x-patch
Size: 382 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20130103/66a1aeda/attachment.bin>


More information about the OpenBSC mailing list