Skip to content

uprobes: mmap_region() corrupts mm->mm_rb if uprobe_mmap() fails

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1uprobes: mmap_region() corrupts mm->mm_rb if uprobe_mmap() failskernel/fork.c mm/mmap.c+4 -51 reply

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchWilliam CohenSrikar Dronamraju
SeriesReported-and-tested-by A-b
1/1Reported-and-tested-by Reported-and-tested-by A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/1] uprobes: mmap_region() corrupts mm->mm_rb if uprobe_mmap() fails

Hello.

I guess this patch was forgotten due to the lengthy discussion, see http://marc.info/?t=134349366100001

I am re-sending it because it fixes the serious and easy-to-trigger problem. Just do something like

	# echo "p /bin/true:OFFSET_OF_INVALID_INSN" > tracing/uprobe_events
	# /bin/true

to crash the kernel. I think this is 3.6/stable material, the patch is simple and obviously can't make any harm.

Just in case... Yes, this is not what we want in the long term, but there is no simple fix for now and we need other changes in uprobe.c before we can teach mmap_region() to handle the error from uprobe_mmap().

Oleg.