From: Tigran Aivazian Subject: [PATCH 4.19.6 2/2] BFS updates Strengthen the superblock sanity checking (supersedes the code that went into 4.19.6). Signed-off-by: Tigran Aivazian Cc: stable@vger.kernel.org --- inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- fs/bfs/inode.c.0 2018-12-02 20:49:00.525461354 +0000 +++ fs/bfs/inode.c 2018-12-02 20:49:51.054686779 +0000 @@ -350,7 +350,7 @@ s->s_magic = BFS_MAGIC; if (le32_to_cpu(bfs_sb->s_start) > le32_to_cpu(bfs_sb->s_end) || - le32_to_cpu(bfs_sb->s_start) < BFS_BSIZE) { + le32_to_cpu(bfs_sb->s_start) < sizeof(struct bfs_super_block) + sizeof(struct bfs_dirent)) { printf("Superblock is corrupted\n"); goto out1; }