]> git.ipfire.org Git - thirdparty/linux.git/commit
ovl: relax WARN_ON in ovl_verify_area()
authorAmir Goldstein <amir73il@gmail.com>
Sun, 17 Mar 2024 11:59:43 +0000 (13:59 +0200)
committerAmir Goldstein <amir73il@gmail.com>
Sun, 17 Mar 2024 13:59:41 +0000 (15:59 +0200)
commit77a28aa476873048024ad56daf8f4f17d58ee48e
tree94e3c50296b58d7d48c3e6025f11b5256eeac782
parent1b17f399a6e07405059fe401cfbe59f9b572093d
ovl: relax WARN_ON in ovl_verify_area()

syzbot hit an assertion in copy up data loop which looks like it is
the result of a lower file whose size is being changed underneath
overlayfs.

This type of use case is documented to cause undefined behavior, so
returning EIO error for the copy up makes sense, but it should not be
causing a WARN_ON assertion.

Reported-and-tested-by: syzbot+3abd99031b42acf367ef@syzkaller.appspotmail.com
Fixes: ca7ab482401c ("ovl: add permission hooks outside of do_splice_direct()")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
fs/overlayfs/copy_up.c