Does Ubuntu Cosmic nvidia-340 have patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'?

Asked by ADFH on 2018-10-26

I upgraded from 18.04 to 18.10 and have been experiencing significant problems with my video card which relies on the nvidia-340 package. I get the following kernel dump frequently:

[80032.424904] resource sanity check: requesting [mem 0x000c0000-0x000fffff], which spans more than PCI Bus 0000:00 [mem 0x000c0000-0x000dffff window]
[80032.425023] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple BARs
[80033.076888] ------------[ cut here ]------------
[80033.076893] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
[80033.076908] WARNING: CPU: 7 PID: 6157 at mm/usercopy.c:81 usercopy_warn+0x81/0xa0
[80033.076909] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) input_leds ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 snd_hda_codec_realtek snd_hda_codec_generic nvidia_uvm(POE) snd_hda_intel snd_hda_codec intel_powerclamp nvidia(POE) snd_hda_core kvm_intel xt_hl ip6t_rt nf_conntrack_ipv6 nf_defrag_ipv6 snd_hwdep ipt_REJECT nf_reject_ipv4 snd_pcm nf_log_ipv4 nf_log_common snd_seq_midi snd_seq_midi_event xt_LOG snd_rawmidi mxm_wmi kvm snd_seq snd_seq_device irqbypass drm xt_limit snd_timer intel_cstate xt_tcpudp serio_raw snd i7core_edac soundcore wmi mac_hid xt_addrtype nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack ip6table_filter sch_fq_codel ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat it87 nf_conntrack_ftp nf_conntrack hwmon_vid coretemp
[80033.076976] parport_pc libcrc32c ppdev iptable_filter bpfilter lp sunrpc parport ip_tables x_tables autofs4 pata_acpi hid_generic usbhid hid gpio_ich firewire_ohci pata_it8213 firewire_core r8169 lpc_ich crc_itu_t mii ahci libahci
[80033.077004] CPU: 7 PID: 6157 Comm: Xorg Tainted: P OE 4.18.0-11-generic #12-Ubuntu
[80033.077006] Hardware name: Gigabyte Technology Co., Ltd. P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
[80033.077010] RIP: 0010:usercopy_warn+0x81/0xa0
[80033.077011] Code: 30 9d 41 51 4d 89 d8 48 c7 c0 89 8d 2f 9d 49 89 f1 48 89 f9 48 0f 45 c2 48 c7 c7 f0 a1 30 9d 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 83 c4 18 c9 c3 48 c7 c6 b2 8a 32 9d 49 89 f1 49 89 f3 eb
[80033.077067] RSP: 0018:ffffbca940d5fb58 EFLAGS: 00010282
[80033.077073] RAX: 0000000000000000 RBX: ffff976093ca5e58 RCX: 0000000000000006
[80033.077075] RDX: 0000000000000007 RSI: 0000000000000092 RDI: ffff97609fdd64b0
[80033.077077] RBP: ffffbca940d5fb70 R08: 0000000000000001 R09: 000000000000044a
[80033.077078] R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000003
[80033.077080] R13: 0000000000000001 R14: ffff976093ca5e5b R15: ffff976093ca5ea0
[80033.077082] FS: 00007f92c0fbfa80(0000) GS:ffff97609fdc0000(0000) knlGS:0000000000000000
[80033.077084] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[80033.077086] CR2: 00007f92bc59e000 CR3: 000000016cce4000 CR4: 00000000000006e0
[80033.077088] Call Trace:
[80033.077095] __check_heap_object+0xc2/0x110
[80033.077098] __check_object_size+0x14c/0x178
[80033.077274] os_memcpy_to_user+0x26/0x50 [nvidia]
[80033.077457] _nv001372rm+0xa5/0x260 [nvidia]
[80033.077460] WARNING: kernel stack frame pointer at 000000002407a693 in Xorg:6157 has bad value 00000000ffc71528
[80033.077463] unwind stack type:0 next_sp: (null) mask:0x2 graph_idx:0
[80033.077466] 000000007a5de9c0: ffffbca940d5fb80 (0xffffbca940d5fb80)
[80033.077469] 000000009e8513c7: ffffffff9c469a82 (__check_heap_object+0xc2/0x110)
[80033.077472] 00000000373825b9: ffffbca940d5fbb0 (0xffffbca940d5fbb0)
[80033.077475] 0000000069a3c542: ffffffff9c491abc (__check_object_size+0x14c/0x178)
[80033.077477] 00000000b9e29f15: 0000000000000003 (0x3)
[80033.077479] 000000000e77427a: ffff976093ca5e58 (0xffff976093ca5e58)
[80033.077481] 000000005bb94001: 00005580e2b3eda0 (0x5580e2b3eda0)
[80033.077483] 000000004dbcb26b: ffff976093ca5e58 (0xffff976093ca5e58)
[80033.077485] 00000000c5403f65: ffffbca940d5fbd8 (0xffffbca940d5fbd8)
[80033.077645] 00000000bdcc2413: ffffffffc0d98d26 (os_memcpy_to_user+0x26/0x50 [nvidia])
[80033.077647] 000000002f01aec5: 0000000000000003 (0x3)
[80033.077649] 0000000041c42fe2: 0000000000000000 ...
[80033.077651] 00000000ebf56bd2: 00005580e2b3eda0 (0x5580e2b3eda0)
[80033.077653] 000000002407a693: ffff976093ca5e50 (0xffff976093ca5e50)
[80033.077833] 00000000dde0d09f: ffffffffc0d1ed15 (_nv001372rm+0xa5/0x260 [nvidia])
[80033.077835] 0000000092572859: 0000000000000000 ...
[80033.077837] 000000000aaca285: ffff97608b0181e8 (0xffff97608b0181e8)
[80033.077839] 0000000005b898e8: ffff976093ca5ed8 (0xffff976093ca5ed8)
[80033.077841] 00000000a01ffdfa: ffff976093ca5e80 (0xffff976093ca5e80)
[80033.078032] 000000005a222cfe: ffffffffc099d88a (_nv004784rm+0x4eba/0x5500 [nvidia])
[80033.078033] 0000000034fa80bf: 0000000000000000 ...
[80033.078035] 00000000e6756b7f: ffff976093ca5ed8 (0xffff976093ca5ed8)
[80033.078037] 00000000ac59e46d: 00007ffd201c5af0 (0x7ffd201c5af0)
[80033.078229] 000000002ca425d9: ffffffffc099dfbc (_nv004331rm+0xec/0xf0 [nvidia])
[80033.078231] 0000000071482bb2: ffff976093ca5ed8 (0xffff976093ca5ed8)
[80033.078233] 00000000ffa36147: ffff975fe0a12008 (0xffff975fe0a12008)
[80033.078235] 00000000351066c1: 0000000000000010 (0x10)
[80033.078236] 000000007cc13a7c: 00007ffd201c5af0 (0x7ffd201c5af0)
[80033.078238] 0000000055ee7498: 00000000c1d00051 (0xc1d00051)
[80033.078426] 00000000d37c47d9: ffffffffc098763a (_nv004326rm+0xca/0x650 [nvidia])
[80033.078428] 000000000dd3f68c: 00000000c1d00051 (0xc1d00051)
[80033.078430] 0000000078cac70a: ffff976093ca5ed8 (0xffff976093ca5ed8)
[80033.078431] 0000000021cfbc59: 0000000000000000 ...
[80033.078606] 00000000298b06bd: ffffffffc0d39ef6 (_nv015126rm+0x576/0x5c0 [nvidia])
[80033.078609] 00000000f777ed77: ffff97608b018520 (0xffff97608b018520)
[80033.078611] 00000000200a89f4: ffff97608b018520 (0xffff97608b018520)
[80033.078613] 0000000066eccc45: ffff97608e300600 (0xffff97608e300600)
[80033.078614] 00000000e77bd66c: 000000000000002a (0x2a)
[80033.078616] 00000000ce7bc1f5: ffff97608e300600 (0xffff97608e300600)
[80033.078796] 000000002bdbcd9d: ffffffffc0d2025e (_nv000694rm+0x2e/0x60 [nvidia])
[80033.078942] 00000000c434242d: ffffffffc1192260 (nv_ctl_waitqueue+0x20/0xffffffffffc09dc0 [nvidia])
[80033.078944] 0000000054c96070: ffff97608b018520 (0xffff97608b018520)
[80033.078946] 000000006eaf4717: ffff97608e300600 (0xffff97608e300600)
[80033.079109] 000000003fc55062: ffffffffc0d77a95 (_nv000789rm+0x5f5/0x8b0 [nvidia])
[80033.079111] 000000001d77733a: ffff976093ca5ff8 (0xffff976093ca5ff8)
[80033.079112] 00000000c7c36f8e: 0000000000000020 (0x20)
[80033.079114] 00000000056ee9d0: ffff976093ca3000 (0xffff976093ca3000)
[80033.079116] 000000001ee66e0a: ffff97608b018520 (0xffff97608b018520)
[80033.079118] 0000000068575d60: 000000000000002a (0x2a)
[80033.079277] 00000000e82b669c: ffffffffc0d81dd3 (rm_ioctl+0x73/0x100 [nvidia])
[80033.079279] 00000000998e7336: ffffbca940d5fe28 (0xffffbca940d5fe28)
[80033.079424] 00000000afde742d: ffffffffc1192260 (nv_ctl_waitqueue+0x20/0xffffffffffc09dc0 [nvidia])
[80033.079426] 0000000083437c16: 000000000000180d (0x180d)
[80033.079428] 0000000038530b44: 15612089351c4da0 (0x15612089351c4da0)
[80033.079430] 000000001f949a5b: 1561208a238775a0 (0x1561208a238775a0)
[80033.079432] 00000000bbb14f66: 1561208a238775a0 (0x1561208a238775a0)
[80033.079434] 000000003f76d148: 15612089ac51e1a0 (0x15612089ac51e1a0)
[80033.079436] 00000000b0dcb0af: 0000000000000000 ...
[80033.079438] 000000002f6d97aa: 0000000000000200 (0x200)
[80033.079440] 000000002415f43e: 0000002000000007 (0x2000000007)
[80033.079442] 00000000d1ee2b72: ffffbca940d5fd18 (0xffffbca940d5fd18)
[80033.079443] 0000000032b139fc: 000000000000180d (0x180d)
[80033.079445] 0000000090b37225: 000000000000180d (0x180d)
[80033.079447] 0000000000fef44d: ffffbca940d5fd00 (0xffffbca940d5fd00)
[80033.079448] 0000000027551cfd: 0000000000000000 ...
[80033.079452] 00000000b3b9d1d7: ffffffff9c491a11 (__check_object_size+0xa1/0x178)
[80033.079454] 0000000058fb9312: 0000000000000020 (0x20)
[80033.079456] 000000008f25a29c: ffff97608b018520 (0xffff97608b018520)
[80033.079458] 00000000427a7e44: ffff97608e300600 (0xffff97608e300600)
[80033.079460] 00000000e01a4993: 000000000000002a (0x2a)
[80033.079606] 00000000777a1c7e: ffffffffc1192260 (nv_ctl_waitqueue+0x20/0xffffffffffc09dc0 [nvidia])
[80033.079766] 0000000005b833e4: ffffffffc0d90288 (nvidia_ioctl+0x148/0x490 [nvidia])
[80033.079768] 000000001205c5de: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.079770] 0000000013e5479c: ffff976093ca3000 (0xffff976093ca3000)
[80033.079772] 00000000125dea3b: ffff97608e300638 (0xffff97608e300638)
[80033.079774] 000000007d1e8f42: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.079776] 000000001153222e: ffff976088def780 (0xffff976088def780)
[80033.079778] 0000000012490ae3: ffffbca940d5fe00 (0xffffbca940d5fe00)
[80033.079780] 000000001c873549: 507f95248328ae00 (0x507f95248328ae00)
[80033.079781] 000000005a2c04d1: 00000000000000ff (0xff)
[80033.079783] 00000000fc55cbbf: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.079785] 00000000f1651c66: 000000000000000f (0xf)
[80033.079787] 0000000085e01c43: ffff975fe07b3f00 (0xffff975fe07b3f00)
[80033.079789] 000000002749f02a: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.079791] 00000000090d5e62: ffffbca940d5fe48 (0xffffbca940d5fe48)
[80033.079950] 0000000015ed0dc2: ffffffffc0d9b812 (nvidia_frontend_ioctl+0x32/0x50 [nvidia])
[80033.079952] 00000000fac90872: ffff97608cda21c8 (0xffff97608cda21c8)
[80033.079954] 00000000f6d2cc4a: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.079956] 00000000a4e95d95: ffffbca940d5fe58 (0xffffbca940d5fe58)
[80033.080114] 00000000c4d2e368: ffffffffc0d9b84d (nvidia_frontend_unlocked_ioctl+0x1d/0x30 [nvidia])
[80033.080116] 00000000f38664c3: ffffbca940d5fed8 (0xffffbca940d5fed8)
[80033.080122] 000000001cb341a0: ffffffff9c4afea8 (do_vfs_ioctl+0xa8/0x620)
[80033.080124] 000000002342dde1: ffffbca940d5feb0 (0xffffbca940d5feb0)
[80033.080126] 0000000092dd5458: ffff975fde0f8500 (0xffff975fde0f8500)
[80033.080128] 0000000062d3ccdc: ffff975fd1443828 (0xffff975fd1443828)
[80033.080130] 000000001b43aa65: ffff975fde0f8510 (0xffff975fde0f8510)
[80033.080131] 00000000dcbbe107: 0000000000000035 (0x35)
[80033.080134] 00000000bf15126f: ffffbca940d5fed8 (0xffffbca940d5fed8)
[80033.080137] 00000000785b517b: ffffffff9c49adbf (vfs_write+0x17f/0x1b0)
[80033.080140] 000000001aefd42b: ffffbca940d5fed8 (0xffffbca940d5fed8)
[80033.080142] 0000000043b3dfe8: 507f95248328ae00 (0x507f95248328ae00)
[80033.080144] 0000000060972619: ffff975fe07b3f00 (0xffff975fe07b3f00)
[80033.080146] 0000000009a6c437: ffff975fe07b3f00 (0xffff975fe07b3f00)
[80033.080147] 000000000c6521d6: 000000000000000f (0xf)
[80033.080149] 000000002d3550df: 00000000c020462a (0xc020462a)
[80033.080151] 0000000043dcaf22: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.080153] 0000000047285f72: ffffbca940d5ff18 (0xffffbca940d5ff18)
[80033.080157] 0000000005831b6d: ffffffff9c4b0487 (ksys_ioctl+0x67/0x90)
[80033.080158] 0000000030298cd4: 0000000000002383 (0x2383)
[80033.080160] 00000000c45957be: 0000000000000000 ...
[80033.080162] 000000001cf7d5af: ffffbca940d5ff58 (0xffffbca940d5ff58)
[80033.080163] 00000000f86a8772: 0000000000000000 ...
[80033.080165] 0000000090b8eb5e: ffffbca940d5ff28 (0xffffbca940d5ff28)
[80033.080169] 00000000413dc940: ffffffff9c4b04ca (__x64_sys_ioctl+0x1a/0x20)
[80033.080171] 00000000bf6b270e: ffffbca940d5ff48 (0xffffbca940d5ff48)
[80033.080176] 00000000e9162c7b: ffffffff9c2042ca (do_syscall_64+0x5a/0x110)
[80033.080177] 000000009461eb56: 0000000000000000 ...
[80033.080182] 00000000f91e07c9: ffffffff9cc00088 (entry_SYSCALL_64_after_hwframe+0x44/0xa9)
[80033.080183] 00000000d073dc99: 000000000000002a (0x2a)
[80033.080185] 00000000132bf410: 0000000000000020 (0x20)
[80033.080187] 000000009593f12f: 00000000c020462a (0xc020462a)
[80033.080189] 00000000895ec5e6: 00007ffd201c5a7c (0x7ffd201c5a7c)
[80033.080191] 000000007d361757: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.080193] 00000000c5d7cd23: 000000005bd2e6e1 (0x5bd2e6e1)
[80033.080195] 00000000e124ca7d: 0000000000003246 (0x3246)
[80033.080196] 00000000ef4f97c6: 0000000000000000 ...
[80033.080198] 000000002d6768ca: 00007ffd201c5a7c (0x7ffd201c5a7c)
[80033.080200] 0000000004513f1d: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.080202] 00000000325c61ea: ffffffffffffffda (0xffffffffffffffda)
[80033.080204] 0000000042290027: 00007f92c22f63c7 (0x7f92c22f63c7)
[80033.080205] 00000000441107b8: 00007ffd201c5a60 (0x7ffd201c5a60)
[80033.080207] 0000000030fa3490: 00000000c020462a (0xc020462a)
[80033.080209] 000000002dc2d058: 000000000000000f (0xf)
[80033.080211] 00000000ea7a151f: 0000000000000010 (0x10)
[80033.080212] 00000000e118fe8c: 00007f92c22f63c7 (0x7f92c22f63c7)
[80033.080214] 00000000f032453f: 0000000000000033 (0x33)
[80033.080216] 0000000022c091b9: 0000000000003246 (0x3246)
[80033.080218] 00000000536f6061: 00007ffd201c59c8 (0x7ffd201c59c8)
[80033.080220] 00000000c8362479: 000000000000002b (0x2b)
[80033.080412] ? _nv004784rm+0x4eba/0x5500 [nvidia]
[80033.080605] ? _nv004331rm+0xec/0xf0 [nvidia]
[80033.080793] ? _nv004326rm+0xca/0x650 [nvidia]
[80033.080968] ? _nv015126rm+0x576/0x5c0 [nvidia]
[80033.081149] ? _nv000694rm+0x2e/0x60 [nvidia]
[80033.081312] ? _nv000789rm+0x5f5/0x8b0 [nvidia]
[80033.081472] ? rm_ioctl+0x73/0x100 [nvidia]
[80033.081477] ? __check_object_size+0xa1/0x178
[80033.081637] ? nvidia_ioctl+0x148/0x490 [nvidia]
[80033.081796] ? nvidia_frontend_ioctl+0x32/0x50 [nvidia]
[80033.081955] ? nvidia_frontend_unlocked_ioctl+0x1d/0x30 [nvidia]
[80033.081959] ? do_vfs_ioctl+0xa8/0x620
[80033.081963] ? vfs_write+0x17f/0x1b0
[80033.081967] ? ksys_ioctl+0x67/0x90
[80033.081971] ? __x64_sys_ioctl+0x1a/0x20
[80033.081975] ? do_syscall_64+0x5a/0x110
[80033.081978] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[80033.081982] ---[ end trace 562cb825cd287193 ]---

... this seems to have been fixed in Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=899998
... with backport from nvidia-390
https://bugzilla.redhat.com/show_bug.cgi?id=1570493
https://bugzilla.redhat.com/attachment.cgi?id=1425704

Assuming it isn't in Ubuntu because I'm seeing it in dmesg..

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu nvidia-graphics-drivers-340 Edit question
Assignee:
No assignee Edit question
Last query:
2018-10-26
Last reply:
2018-10-29
Manfred Hampl (m-hampl) said : #1

I suggest that you create a bug report.

Can you help with this problem?

Provide an answer of your own, or ask ADFH for more information if necessary.

To post a message you must log in.