Re: [PATCH] libceph: fix use after free

2018-11-27 Thread PanBian
On Tue, Nov 27, 2018 at 11:47:56AM +0300, Sergei Shtylyov wrote: > Hello! > > On 27.11.2018 10:02, Pan Bian wrote: > > >The function ceph_monc_handle_map calls kfree(old) to free the old > >monitor map, old points to monc->monmap. However, after that, it reads > >monc->monmap->epoch and passes it

Re: [PATCH] libceph: fix use after free

2018-11-27 Thread Sergei Shtylyov
Hello! On 27.11.2018 10:02, Pan Bian wrote: The function ceph_monc_handle_map calls kfree(old) to free the old monitor map, old points to monc->monmap. However, after that, it reads monc->monmap->epoch and passes it to __ceph_monc_got_map. This result in a use-after-free bug. The patch moves th

[PATCH] libceph: fix use after free

2018-11-26 Thread Pan Bian
The function ceph_monc_handle_map calls kfree(old) to free the old monitor map, old points to monc->monmap. However, after that, it reads monc->monmap->epoch and passes it to __ceph_monc_got_map. This result in a use-after-free bug. The patch moves the free operation after the call to __ceph_monc_g