lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230417094638.153213-1-haibo.li@mediatek.com>
Date:   Mon, 17 Apr 2023 17:46:38 +0800
From:   Haibo Li <haibo.li@...iatek.com>
To:     <linus.walleij@...aro.org>
CC:     <a.anurag@...sung.com>, <alexander.sverdlin@...ia.com>,
        <amergnat@...libre.com>, <angelogioacchino.delregno@...labora.com>,
        <ardb@...nel.org>, <catalin.marinas@....com>,
        <haibo.li@...iatek.com>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>, <linux@...linux.org.uk>,
        <matthias.bgg@...il.com>, <rmk+kernel@...linux.org.uk>,
        <xiaoming.yu@...iatek.com>
Subject: Re: [PATCH v3] ARM:unwind:fix unwind abort for uleb128 case

> On Fri, Apr 14, 2023 at 8:10 AM Haibo Li <haibo.li@...iatek.com> wrote:
> 
> > When unwind instruction is 0xb2,the subsequent instructions are
> > uleb128 bytes.
> > For now,it uses only the first uleb128 byte in code.
> >
> > For vsp increments of 0x204~0x400,use one uleb128 byte like below:
> > 0xc06a00e4 <unwind_test_work>: 0x80b27fac
> >   Compact model index: 0
> >   0xb2 0x7f vsp = vsp + 1024
> >   0xac      pop {r4, r5, r6, r7, r8, r14}
> >
> > For vsp increments larger than 0x400,use two uleb128 bytes like below:
> > 0xc06a00e4 <unwind_test_work>: @0xc0cc9e0c
> >   Compact model index: 1
> >   0xb2 0x81 0x01 vsp = vsp + 1032
> >   0xac      pop {r4, r5, r6, r7, r8, r14}
> > The unwind works well since the decoded uleb128 byte is also 0x81.
> >
> > For vsp increments larger than 0x600,use two uleb128 bytes like below:
> > 0xc06a00e4 <unwind_test_work>: @0xc0cc9e0c
> >   Compact model index: 1
> >   0xb2 0x81 0x02 vsp = vsp + 1544
> >   0xac      pop {r4, r5, r6, r7, r8, r14}
> > In this case,the decoded uleb128 result is 0x101(vsp=0x204+(0x101<<2)).
> > While the uleb128 used in code is 0x81(vsp=0x204+(0x81<<2)).
> > The unwind aborts at this frame since it gets incorrect vsp.
> >
> > To fix this,add uleb128 decode to cover all the above case.
> >
> > Signed-off-by: Haibo Li <haibo.li@...iatek.com>
> 
> Way to go, remember to collect all the Reviewed-by tags before you put the
> patch into Russell's patch tracker.
> 
> Yours,
> Linus Walleij
Thanks for reminding.I put the patch into Russell's patch tracker just now,
together with the three Reviewed-by tags from you,
Alexandre Mergnat and AngeloGioacchino Del Regno.
Thank you all.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ