Thread (23 messages) 23 messages, 6 authors, 2022-08-23

Re: [syzbot] WARNING in iomap_iter

From: Matthew Wilcox <willy@infradead.org>
Date: 2022-08-22 14:46:22
Also in: linux-fsdevel, linux-xfs, lkml

Possibly related (same subject, not in this thread)

On Sun, Aug 21, 2022 at 05:18:16PM +0530, Siddh Raman Pant wrote:
quoted hunk ↗ jump to hunk
@@ -979,9 +979,15 @@ loop_set_status_from_info(struct loop_device *lo,
 
 	lo->lo_offset = info->lo_offset;
 	lo->lo_sizelimit = info->lo_sizelimit;
+	lo->lo_flags = info->lo_flags;
+
+	/* loff_t/int vars are assigned __u64/__u32 vars (respectively) */
+	if (lo->lo_offset < 0 || lo->lo_sizelimit < 0 || lo->lo_flags < 0)
+		return -EOVERFLOW;
Why would you check lo_flags?  That really, really should be an unsigned
type.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help