dm flakey: check for null arg_name in parse_features()
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Mon, 4 Dec 2017 03:14:12 +0000 (21:14 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 05:59:05 +0000 (07:59 +0200)
commite0a272f8fd262f541ac766883d7ca801a89dbf93
treedf2e82b02e1cebd19c40c6193d813ea98a5be2bb
parent40a88da4d8a1746c61393f38e9e48b6853ee8298
dm flakey: check for null arg_name in parse_features()

[ Upstream commit 7690e25302dc7d0cd42b349e746fe44b44a94f2b ]

One can crash dm-flakey by specifying more feature arguments than the
number of features supplied.  Checking for null in arg_name avoids
this.

dmsetup create flakey-test --table "0 66076080 flakey /dev/sdb9 0 0 180 2 drop_writes"

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-flakey.c