[PATCH 1/2] write_queue: Avoid possible use-after-free if fd is read-/writable

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 dwillmann at sysmocom.de
Tue Jun 10 08:03:11 UTC 2014


On Wed, 2014-06-04 at 17:58, Holger Hans Peter Freyther wrote:
> On Wed, May 21, 2014 at 03:08:18PM +0200, Daniel Willmann wrote:
> 
> >  	return 0;
> > +err_badfd:
> > +	return rc;
> 
> hi, why do you want to change the return value here? Why is the
> return 0 not good enough here?

You're right, it would be. In fact, the return value of this callback is
not checked in osmo_select_main() at all (and there doesn't seem to be
any use for it in that place either). I'll update the patch to return 0
in both cases.


Regards,
Daniel

-- 
- Daniel Willmann <dwillmann at sysmocom.de>       http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Schivelbeiner Str. 5
* 10439 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte




More information about the OpenBSC mailing list