Laura Abbott
19ca1a2830
sunrpc: Don't use stack buffer with scatterlist
...
[ Upstream commit 44090cc876926277329e1608bafc01b9f6da627f ]
Fedora got a bug report from NFS:
kernel BUG at include/linux/scatterlist.h:143!
...
RIP: 0010:sg_init_one+0x7d/0x90
..
make_checksum+0x4e7/0x760 [rpcsec_gss_krb5]
gss_get_mic_kerberos+0x26e/0x310 [rpcsec_gss_krb5]
gss_marshal+0x126/0x1a0 [auth_rpcgss]
? __local_bh_enable_ip+0x80/0xe0
? call_transmit_status+0x1d0/0x1d0 [sunrpc]
call_transmit+0x137/0x230 [sunrpc]
__rpc_execute+0x9b/0x490 [sunrpc]
rpc_run_task+0x119/0x150 [sunrpc]
nfs4_run_exchange_id+0x1bd/0x250 [nfsv4]
_nfs4_proc_exchange_id+0x2d/0x490 [nfsv4]
nfs41_discover_server_trunking+0x1c/0xa0 [nfsv4]
nfs4_discover_server_trunking+0x80/0x270 [nfsv4]
nfs4_init_client+0x16e/0x240 [nfsv4]
? nfs_get_client+0x4c9/0x5d0 [nfs]
? _raw_spin_unlock+0x24/0x30
? nfs_get_client+0x4c9/0x5d0 [nfs]
nfs4_set_client+0xb2/0x100 [nfsv4]
nfs4_create_server+0xff/0x290 [nfsv4]
nfs4_remote_mount+0x28/0x50 [nfsv4]
mount_fs+0x3b/0x16a
vfs_kern_mount.part.35+0x54/0x160
nfs_do_root_mount+0x7f/0xc0 [nfsv4]
nfs4_try_mount+0x43/0x70 [nfsv4]
? get_nfs_version+0x21/0x80 [nfs]
nfs_fs_mount+0x789/0xbf0 [nfs]
? pcpu_alloc+0x6ca/0x7e0
? nfs_clone_super+0x70/0x70 [nfs]
? nfs_parse_mount_options+0xb40/0xb40 [nfs]
mount_fs+0x3b/0x16a
vfs_kern_mount.part.35+0x54/0x160
do_mount+0x1fd/0xd50
ksys_mount+0xba/0xd0
__x64_sys_mount+0x21/0x30
do_syscall_64+0x60/0x1f0
entry_SYSCALL_64_after_hwframe+0x49/0xbe
This is BUG_ON(!virt_addr_valid(buf)) triggered by using a stack
allocated buffer with a scatterlist. Convert the buffer for
rc4salt to be dynamically allocated instead.
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1615258
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-15 09:46:45 +02:00
..
2018-09-09 10:32:33 +02:00
2018-07-02 20:34:04 +09:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-23 10:29:33 +02:00
2018-08-22 07:43:43 +02:00
2018-07-11 16:10:57 -07:00
2018-06-28 21:39:16 +09:00
2018-06-16 07:39:34 +09:00
2018-07-21 16:14:39 -07:00
2018-06-28 10:40:47 -07:00
2018-06-15 07:24:58 +09:00
2018-08-22 07:43:43 +02:00
2018-06-12 16:19:22 -07:00
2018-08-07 15:34:44 -07:00
2018-06-28 10:40:47 -07:00
2018-07-16 11:22:14 -07:00
2018-08-08 19:19:03 -07:00
2018-05-08 00:02:36 -04:00
2018-09-09 10:32:27 +02:00
2018-04-22 21:12:00 -04:00
2018-09-15 09:46:42 +02:00
2018-09-15 09:46:44 +02:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-06-28 10:40:47 -07:00
2018-08-22 07:43:40 +02:00
2018-08-07 15:54:00 -07:00
2018-07-06 14:34:42 +02:00
2018-09-09 10:32:27 +02:00
2018-03-27 13:18:09 -04:00
2018-06-20 07:26:58 +09:00
2018-07-24 00:36:33 +02:00
2018-05-14 17:24:18 -04:00
2018-08-04 17:52:51 -07:00
2018-06-28 10:40:47 -07:00
2018-07-18 10:51:45 -07:00
2018-07-12 16:55:29 -07:00
2018-07-29 13:20:54 -07:00
2018-08-06 13:48:33 -07:00
2018-06-28 10:40:47 -07:00
2018-07-05 20:20:03 +09:00
2018-07-26 14:03:07 -07:00
2018-05-23 11:26:45 +02:00
2018-06-28 10:40:47 -07:00
2018-08-08 19:10:26 -07:00
2018-09-15 09:46:42 +02:00
2018-09-15 09:46:44 +02:00
2018-08-08 19:14:22 -07:00
2018-06-28 21:37:26 +09:00
2018-09-15 09:46:45 +02:00
2018-09-15 09:46:42 +02:00
2018-07-20 14:38:14 -07:00
2018-06-28 10:40:47 -07:00
2018-08-07 12:39:13 -07:00
2018-07-24 09:11:31 +02:00
2018-06-28 10:40:47 -07:00
2018-07-31 02:03:19 +02:00
2018-06-25 16:43:36 +02:00
2018-04-27 19:46:06 -04:00
2018-05-28 22:59:54 -04:00
2018-06-28 13:36:39 +09:00
2018-08-22 07:43:43 +02:00
2018-03-27 13:18:09 -04:00