genode/base/src/core
Alexander Boettcher f50d816555 base: fix dangling session pointers in rm_session
If page faults are handled concurrently (as for base-nova) the traverse lookup
call in rm_session_component must be thread safe, which it isn't.
If the faulting area is backed by nested dataspaces which are managed by
various rm_sessions then a race happens under following circumstances
(triggered occasionally by the bomb test).

The traverse lookup may return a pointer to a rm_session of a nested dataspace.
If the rm_session is in parallel subject to destruction it happened that faults
got enqueued to the faulters list of the deleted rm_session and internally to
a list of the current rm_session of the Rm_client.

During destruction of the faulting Rm_client the associated rm_session will
be dissolved from the Rm_client, which leads to dereferencing the
dangling pointer of the already destructed rm_session.

On base-nova the memory of the rm_session object get unmapped eventually, so
that the de-referencing of the dangling pointer caused page faults in core.

The memory on other kernels inside core never get unmapped so that the
bug doesn't trigger visible faults.

The patch replace the keeping of a rm_session pointer by keeping a
capability instead. The rm_session object must be looked up now explicitly in
the Object_pool implementation, which implements proper reference counting on
the rm_session object.

Issue #549
2013-02-11 12:01:26 +01:00
..
include base: fix dangling session pointers in rm_session 2013-02-11 12:01:26 +01:00
x86 Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
context_area.cc base: add remove_client to rm_session 2013-02-11 12:01:25 +01:00
core_mem_alloc.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
cpu_session_component.cc base: fix faults in rm_session de-constructor path 2013-02-11 12:01:25 +01:00
dataspace_component.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
dump_alloc.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
io_mem_session_component.cc Coding style fixes 2013-01-24 11:35:56 +01:00
main.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
mb_info.h Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
multiboot_info.cc Coding style fixes 2013-01-24 11:35:56 +01:00
pd_session_component.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
platform_services.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
ram_session_component.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
rm_session_component.cc base: fix dangling session pointers in rm_session 2013-02-11 12:01:26 +01:00
rom_session_component.cc Update copyright headers to 2013 2013-01-10 21:44:47 +01:00
signal_session_component.cc Coding style fixes 2013-01-24 11:35:56 +01:00
signal_source_component.cc Coding style fixes 2013-01-24 11:35:56 +01:00