lkml.org 
[lkml]   [2024]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation
    Hi,

    On Thu, May 16, 2024 at 6:13 PM Matthew Wilcox <willy@infradead.org> wrote:
    >
    > On Fri, May 17, 2024 at 12:29:06AM +0000, Justin Stitt wrote:
    > > When running syzkaller with the newly reintroduced signed integer
    > > overflow sanitizer we encounter this report:
    >
    > why do you keep saying it's unintentional? it's clearly intended.

    Right, "unintentional" is a poor choice of phrasing. I actually mean:
    "overflow-checking arithmetic was done in a way that intrinsically
    causes an overflow (wraparound)".

    I can clearly see the intent of the code; there's even comments saying
    exactly what it does: "/* Ensure offsets don't wrap. */"... So the
    thinking is: let's use the overflow-checking helpers so we can get a
    good signal through the sanitizers on _real_ bugs, especially in spots
    with no bounds handling.


    Thanks
    Justin

    \
     
     \ /
      Last update: 2024-05-17 22:41    [W:5.781 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site