Files
linux/fs/nfs
Yao Liu 6f976ecaf1 nfs: Fix NULL pointer dereference of dev_name
[ Upstream commit 80ff001724 ]

There is a NULL pointer dereference of dev_name in nfs_parse_devname()

The oops looks something like:

  BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
  ...
  RIP: 0010:nfs_fs_mount+0x3b6/0xc20 [nfs]
  ...
  Call Trace:
   ? ida_alloc_range+0x34b/0x3d0
   ? nfs_clone_super+0x80/0x80 [nfs]
   ? nfs_free_parsed_mount_data+0x60/0x60 [nfs]
   mount_fs+0x52/0x170
   ? __init_waitqueue_head+0x3b/0x50
   vfs_kern_mount+0x6b/0x170
   do_mount+0x216/0xdc0
   ksys_mount+0x83/0xd0
   __x64_sys_mount+0x25/0x30
   do_syscall_64+0x65/0x220
   entry_SYSCALL_64_after_hwframe+0x49/0xbe

Fix this by adding a NULL check on dev_name

Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:04:57 -07:00
..
2017-10-08 10:26:10 +02:00
2017-12-14 09:28:23 +01:00
2016-10-04 16:20:26 -04:00
2016-03-31 00:30:15 -04:00
2016-11-18 13:35:58 -05:00
2018-11-13 11:17:01 -08:00
2015-04-23 15:16:14 -04:00
2018-09-26 08:36:37 +02:00
2018-09-26 08:36:37 +02:00
2015-04-23 15:16:14 -04:00
2016-05-17 15:47:55 -04:00
2016-09-27 11:03:58 +02:00
2016-10-07 18:46:28 -07:00
2016-07-20 23:30:06 -04:00
2018-03-18 11:18:54 +01:00