Re: [syzbot] [crypto?] WARNING in extract_iter_to_sg

From: David Howells
Date: Wed Jul 05 2023 - 19:06:54 EST


> CPU: 0 PID: 26699 Comm: syz-executor.2 Not tainted 6.4.0-rc7-syzkaller-01944-g3674fbf0451d #0

Looking at the version string, this is from net-next before the merger with
Linus's tree after the point where Linus had merged:

https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-6.5/splice

> extract_iter_to_sg(3) unsupported

This is ITER_PIPE (type 3) before is removed by:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3fc40265ae2b48a7475c41c5c0b256374c419f4b

From that point on ITER_XARRAY is type 3 and there's a case for that in
extract_iter_to_sg().

So the fix for this is to merge it with the splice tree - which Linus has
already done, so this should be fixed upstream.

With hindsight, I should've used iov_iter_get_pages*() rather than
iov_iter_extract_pages() and extract_iter_to_sg() in the networking code
recvmsg() path until after the merge.

David