Re: Add Morton,Peter and David for discussion//Re: [PATCH -next] uprobes: fix two zero old_folio bugs in __replace_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20.02.25 03:31, Tong Tiangen wrote:


在 2025/2/20 0:12, David Hildenbrand 写道:
On 19.02.25 16:22, Oleg Nesterov wrote:
On 02/18, Tong Tiangen wrote:

OK, Before your rewrite last merged, How about i change the solution to
just reject them immediately after get_user_page_vma_remote()?

I agree, uprobe_write_opcode() should simply fail if
is_zero_page(old_page).

Yes. That's currently only syzkaller that triggers it, not some sane use
case.

OK, change as follows:

--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -506,6 +506,12 @@ int uprobe_write_opcode(struct arch_uprobe
*auprobe, struct mm_struct *mm,
          if (ret <= 0)
                  goto put_old;

+       if (WARN(is_zero_page(old_page),

This can likely be triggered by user space, so do not use WARN.

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux