lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 May 2020 08:49:04 +0200
From:   Sven Schnelle <>
To:     Christian Borntraeger <>
Cc:     Oleg Nesterov <>,
        Srikar Dronamraju <>,
        Guo Ren <>,
        "David S. Miller" <>,
        Linus Torvalds <>,
        Steven Rostedt <>,
        "Eric W. Biederman" <>,
        Peter Zijlstra <>,
        Ingo Molnar <>, Jann Horn <>,
        Al Viro <>,
        Jens Axboe <>,
        Security Officers <>,
        Andrea Arcangeli <>,
        Ananth N Mavinakayanahalli <>,
        Naveen Rao <>,
        Andrew Morton <>,, Vasily Gorbik <>
Subject: Re: [PATCH] uprobes: ensure that uprobe->offset and ->ref_ctr_offset
 are properly aligned


On Mon, May 04, 2020 at 08:40:44PM +0200, Christian Borntraeger wrote:
> On 04.05.20 18:47, Oleg Nesterov wrote:
> > uprobe_write_opcode() must not cross page boundary; prepare_uprobe()
> > relies on arch_uprobe_analyze_insn() which should validate "vaddr" but
> > some architectures (csky, s390, and sparc) don't do this.
> I think the idea was that the uprobe instruction is 2 bytes and instructions
> are always aligned to 2 bytes on s390.  (we can have 2,4 or 6 bytes).
> > 
> > We can remove the BUG_ON() check in prepare_uprobe() and validate the
> > offset early in __uprobe_register(). The new IS_ALIGNED() check matches
> > the alignment check in arch_prepare_kprobe() on supported architectures,
> > so I think that all insns must be aligned to UPROBE_SWBP_INSN_SIZE.
> Not sure if it would have been possible to try to create a uprobe on an 
> odd address. If yes, then the new IS_ALIGNED check certainly makes this
> better for s390, so the patch looks sane. Adding Vasily and Sven to double
> check.

I did a quick test, and without this patch it is possible to place a uprobe
at an odd address. With the patch it fails with EINVAL, which is more


Powered by blists - more mailing lists