f2fs: sanity check checkpoint segno and blkoff
authorJin Qian <jinqian@google.com>
Mon, 15 May 2017 17:45:08 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:49:31 +0000 (08:49 -0700)
commit0f442c5b2e4ac0b65027ed3374462f1c38675f7e
treeb8daafe17bf3db5762ddda3e6d54abe6ca999549
parentc14e327bee7018659e0b64db265e19f62cc2bd72
f2fs: sanity check checkpoint segno and blkoff

commit 15d3042a937c13f5d9244241c7a9c8416ff6e82a upstream.

Make sure segno and blkoff read from raw image are valid.

Cc: stable@vger.kernel.org
Signed-off-by: Jin Qian <jinqian@google.com>
[Jaegeuk Kim: adjust minor coding style]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
[AmitP: Found in Android Security bulletin for Aug'17, fixes CVE-2017-10663]
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/super.c