]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ecryptfs: fix kernel panic with null dev_name
authorJeffrey Mitchell <jeffrey.mitchell@starlab.io>
Fri, 26 Feb 2021 21:00:23 +0000 (15:00 -0600)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:31:51 +0000 (10:31 +0200)
commit84d8bac313a62ad4890e789df8baed4a9be819d6
tree5b7a18b03cb80656b3c1732855174d6e88e7ec86
parent7fd62c06c6c4cf0f948dcd4c31c5de0609f1b36a
ecryptfs: fix kernel panic with null dev_name

BugLink: https://bugs.launchpad.net/bugs/1928857
commit 9046625511ad8dfbc8c6c2de16b3532c43d68d48 upstream.

When mounting eCryptfs, a null "dev_name" argument to ecryptfs_mount()
causes a kernel panic if the parsed options are valid. The easiest way to
reproduce this is to call mount() from userspace with an existing
eCryptfs mount's options and a "source" argument of 0.

Error out if "dev_name" is null in ecryptfs_mount()

Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig")
Cc: stable@vger.kernel.org
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
Signed-off-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/ecryptfs/main.c