Re: [PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-24 Thread Christian Lindig
> On 24 Nov 2022, at 14:13, Andrew Cooper wrote: > > On 24/11/2022 14:03, Edwin Torok wrote: >> >>> On 24 Nov 2022, at 13:43, Andrew Cooper wrote: >>> >>> On 24/11/2022 09:03, Edwin Torok wrote: >> Perhaps a compromise between the 2 extremes would be for xenopsd to open and >> have its own

Re: [PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-24 Thread Andrew Cooper
On 24/11/2022 14:03, Edwin Torok wrote: > >> On 24 Nov 2022, at 13:43, Andrew Cooper wrote: >> >> On 24/11/2022 09:03, Edwin Torok wrote: On 23 Nov 2022, at 22:25, Andrew Cooper wrote: The binding for xc_interface_close() free the underlying handle while leaving the

Re: [PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-24 Thread Edwin Torok
> On 24 Nov 2022, at 13:43, Andrew Cooper wrote: > > On 24/11/2022 09:03, Edwin Torok wrote: >>> On 23 Nov 2022, at 22:25, Andrew Cooper wrote: >>> >>> The binding for xc_interface_close() free the underlying handle while >>> leaving >>> the Ocaml object still in scope and usable. This

Re: [PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-24 Thread Andrew Cooper
On 24/11/2022 09:03, Edwin Torok wrote: >> On 23 Nov 2022, at 22:25, Andrew Cooper wrote: >> >> The binding for xc_interface_close() free the underlying handle while leaving >> the Ocaml object still in scope and usable. This would make it easy to >> suffer >> a use-after-free, if it weren't

Re: [PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-24 Thread Edwin Torok
> On 23 Nov 2022, at 22:25, Andrew Cooper wrote: > > The binding for xc_interface_close() free the underlying handle while leaving > the Ocaml object still in scope and usable. This would make it easy to suffer > a use-after-free, if it weren't for the fact that the typical usage is as a >

[PATCH] tools/ocaml/xenctrl: OCaml 5 support, fix use-after-free

2022-11-23 Thread Andrew Cooper
The binding for xc_interface_close() free the underlying handle while leaving the Ocaml object still in scope and usable. This would make it easy to suffer a use-after-free, if it weren't for the fact that the typical usage is as a singleton that lives for the lifetime of the program. Ocaml 5 no