The remove_ and delete_ functions remove the current element from the
asyncio_reader_list, and free it, respectively.

We then return back to the loop at the top, wherein the asyncio_reader variable 
still points at the now-freed element,
whose contents are now scrambled by having link pointers, etc, from internal 
malloc state overlaying the data.

This loop should probably extract the ->link pointer prior to calling
->receiver(), as that function can free the asyncio_reader object in
question. (LP: #1481388)

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1481388

Title:
  NTP : Use-after-free in routing socket code after dropping root

Status in ntp package in Ubuntu:
  New

Bug description:
  We have 1 server (among hundreds) that its ntp service is crashing.

  A few minute/seconds after a start attempts we can see the following in 
syslog:
  Jul 1 05:33:28 svpr-stk67 ntpd[2729]: peers refreshed
  Jul 1 05:33:28 svpr-stk67 ntpd[2729]: Listening on routing socket on fd #49 
for interface updates
  Jul 1 05:36:32 svpr-stk67 ntpd[2729]: i/o error on routing socket No buffer 
space available - disabling
  Jul 1 05:36:32 svpr-stk67 kernel: [157516.495224] ntpd[2729]: segfault at 31 
ip 0000000000000031 sp 00007ffff9f11788 error 14 in 
libpthread-2.15.so[7f967a5d9000+18000]

  OS: Ubuntu 12.04.4 LTS
  Kernel: 3.11.0-19-generic

  I tried to compare it to other servers, and the only thing I could find that 
is different is that while it's up (before it crashes) I can see the following 
when running "lsof | grep ntp":
  ntpd 2729 ntp 49u sock 0,7 0t0 2473952565 can't identify protocol.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1481388/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to