Re: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-20 Thread Jan Kara
On Fri 17-05-24 00:29:06, Justin Stitt wrote: > When running syzkaller with the newly reintroduced signed integer > overflow sanitizer we encounter this report: > > UBSAN: signed-integer-overflow in ../fs/read_write.c:91:10 > 9223372036854775807 + 4096 cannot be represented in type 'loff_t' (aka '

Re: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-17 Thread Kees Cook
On Fri, May 17, 2024 at 02:26:47AM +0100, Al Viro wrote: > On Fri, May 17, 2024 at 02:13:22AM +0100, Matthew Wilcox wrote: > > On Fri, May 17, 2024 at 12:29:06AM +, Justin Stitt wrote: > > > When running syzkaller with the newly reintroduced signed integer > > > overflow sanitizer we encounter

Re: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-17 Thread Justin Stitt
Hi, On Thu, May 16, 2024 at 6:13 PM Matthew Wilcox wrote: > > On Fri, May 17, 2024 at 12:29:06AM +, 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 c

Re: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-16 Thread Matthew Wilcox
On Fri, May 17, 2024 at 02:26:47AM +0100, Al Viro wrote: > On Fri, May 17, 2024 at 02:13:22AM +0100, Matthew Wilcox wrote: > > On Fri, May 17, 2024 at 12:29:06AM +, Justin Stitt wrote: > > > When running syzkaller with the newly reintroduced signed integer > > > overflow sanitizer we encounter

Re: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-16 Thread Al Viro
On Fri, May 17, 2024 at 02:13:22AM +0100, Matthew Wilcox wrote: > On Fri, May 17, 2024 at 12:29:06AM +, 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'

Re: [PATCH v3] fs: fix unintentional arithmetic wraparound in offset calculation

2024-05-16 Thread Matthew Wilcox
On Fri, May 17, 2024 at 12:29:06AM +, 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.