In the Linux kernel, the following vulnerability has been resolved:
loop: Check for overflow while configuring loop
The userspace can configure a loop using an ioctl call, wherein a configuration of type loopconfig is passed (see loioctl()'s case on line 1550 of drivers/block/loop.c). This proceeds to call loopconfigure() which in turn calls loopsetstatusfrominfo() (see line 1050 of loop.c), passing &config->info which is of type loopinfo64*. This function then sets the appropriate values, like the offset.
loopdevice has looffset of type lofft (see line 52 of loop.c), which is typdef-chained to long long, whereas loopinfo64 has looffset of type _u64 (see line 56 of include/uapi/linux/loop.h).
The function directly copies offset from info to the device as follows (See line 980 of loop.c): lo->looffset = info->looffset;
This results in an overflow, which triggers a warning in iomapiter() due to a call to iomapiterdone() which has: WARNON_ONCE(iter->iomap.offset > iter->pos);
Thus, check for negative value during loopsetstatusfrominfo().
Bug report: https://syzkaller.appspot.com/bug?id=c620fe14aac810396d3c3edc9ad73848bf69a29e