]> git.baikalelectronics.ru Git - 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)
committerTyler Hicks <code@tyhicks.com>
Mon, 19 Apr 2021 05:50:32 +0000 (05:50 +0000)
commit0c47cdaa16b025a4498d743580859d1b4bec9f43
treed2b00bbc0f0d0c975a245ba0c093823c4da8028c
parent9dc69e2582bcf326218cd1b8da9ea9d404b84101
ecryptfs: fix kernel panic with null dev_name

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: 53341c1af99c ("[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>
fs/ecryptfs/main.c