[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-10-17 Thread Tyler Hicks
Thanks for pointing that out! I'm marking this bug as fixed for nvidia-
graphics-drivers-340.

** Changed in: nvidia-graphics-drivers-340 (Ubuntu)
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Fix Released
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  Confirmed

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_sp:  (null) mask:0x2 
graph_idx:0
  [   75.352053] 84c91694: bcc5414f3b

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-10-17 Thread satmandu
This patch was added to the nvidia-340 package in 340.107-0ubuntu5 as
per http://changelogs.ubuntu.com/changelogs/pool/restricted/n/nvidia-
graphics-drivers-340/nvidia-graphics-drivers-
340_340.107-0ubuntu7/changelog so this bug can be marked as resolved.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  Confirmed

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_sp:  (null) mask:0

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-10-17 Thread Tyler Hicks
We're considering disabling CONFIG_HARDENED_USERCOPY_FALLBACK in
preparation for 20.04 LTS so getting this fixed soon would be necessary
to keep the driver working.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  Confirmed

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_sp:  (null) mask:0x2 
graph_idx:0
  [   75.352053] 84c91694: bcc5414f3b80 (0xbcc5414f3b80)
  

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-06-07 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: nvidia-graphics-drivers-340-updates (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  Confirmed

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_sp:  (null) mask:0x2 
graph_idx:0
  [   75.352053] 84c91694: bcc5414f3b80 (0xbcc5414f3b80)
  [ 

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-05-15 Thread Ubuntu Foundations Team Bug Bot
The attachment "kmem_cache_create_usercopy.patch" seems to be a patch.
If it isn't, please remove the "patch" flag from the attachment, remove
the "patch" tag, and if you are a member of the ~ubuntu-reviewers,
unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  New

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff 

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-05-15 Thread satmandu
This is the patch from debian for this issue. The driver seems to
compile fine with it.


** Patch added: "kmem_cache_create_usercopy.patch"
   
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-340/+bug/1802622/+attachment/5264097/+files/kmem_cache_create_usercopy.patch

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  New

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2019-02-21 Thread Mushroomzz
** Also affects: nvidia-graphics-drivers-340-updates (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed
Status in nvidia-graphics-drivers-340-updates package in Ubuntu:
  New

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_sp:  (null) mask:0x2 
graph_idx:0
  [   75.352053] 84c91694: bcc5414f3b80 (0xbcc5414f3b80)
  [   75.352055] 4d93127f: ab669a82 
(__check_heap_

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2018-12-01 Thread js1
No problems in 18.04, but just installed 18.10 and immediately noticed:

[   22.210060] [ cut here ]
[   22.210064] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
[   22.210080] WARNING: CPU: 0 PID: 1044 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
[   22.210081] Modules linked in: ccm nvidia_uvm(POE) rfcomm bnep dell_wmi 
wmi_bmof sparse_keymap snd_hda_codec_idt snd_hda_codec_generic snd_hda_intel 
dell_rbtn snd_hda_codec snd_hda_core snd_hwdep snd_pcm dell_laptop coretemp 
dell_smbios dell_wmi_descriptor dcdbas snd_seq_midi dell_smm_hwmon arc4 kvm 
snd_seq_midi_event irqbypass ath9k snd_rawmidi joydev snd_seq ath9k_common 
input_leds nvidia(POE) serio_raw ath9k_hw snd_seq_device pcmcia ath mac80211 
snd_timer btusb btrtl btbcm btintel yenta_socket pcmcia_rsrc snd bluetooth 
pcmcia_core cfg80211 ecdh_generic drm soundcore wmi mac_hid ip6table_filter 
ip6_tables xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack 
iptable_filter bpfilter sch_fq_codel parport_pc ppdev lp parport ip_tables 
x_tables autofs4 btrfs xor zstd_compress raid6_pq
[   22.210146]  libcrc32c crypto_simd cryptd glue_helper aes_x86_64 
algif_skcipher af_alg dm_crypt dm_mirror dm_region_hash dm_log gpio_ich psmouse 
lpc_ich ahci i2c_i801 libahci firewire_ohci pata_acpi firewire_core crc_itu_t 
tg3 video
[   22.210167] CPU: 0 PID: 1044 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
[   22.210168] Hardware name: Dell Inc. Latitude D630   /, BIOS 
A19 06/04/2013
[   22.210171] RIP: 0010:usercopy_warn+0x81/0xa0
[   22.210172] Code: 50 9f 41 51 4d 89 d8 48 c7 c0 89 8d 4f 9f 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 9f 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 9f 49 89 f1 49 89 f3 eb 
[   22.210212] RSP: 0018:9f98c1387b58 EFLAGS: 00010282
[   22.210214] RAX:  RBX: 916c551bae58 RCX: 0006
[   22.210215] RDX: 0007 RSI: 0092 RDI: 916c5fc164b0
[   22.210217] RBP: 9f98c1387b70 R08: 0001 R09: 03b7
[   22.210218] R10: 0004 R11:  R12: 0003
[   22.210219] R13: 0001 R14: 916c551bae5b R15: 916c551baea0
[   22.210221] FS:  7f097fd85a80() GS:916c5fc0() 
knlGS:
[   22.210223] CS:  0010 DS:  ES:  CR0: 80050033
[   22.210225] CR2: 7f097b36f000 CR3: 0001112a4000 CR4: 06f0
[   22.210226] Call Trace:
[   22.210233]  __check_heap_object+0xc2/0x110
[   22.210235]  __check_object_size+0x14c/0x178
[   22.210406]  os_memcpy_to_user+0x26/0x50 [nvidia]
[   22.210506]  _nv001372rm+0xa5/0x260 [nvidia]
[   22.210509] WARNING: kernel stack frame pointer at 8ab5a0d0 in 
Xorg:1044 has bad value 09c6dee6
[   22.210511] unwind stack type:0 next_sp:  (null) mask:0x2 graph_idx:0
[   22.210513] d9b18b42: 9f98c1387b80 (0x9f98c1387b80)
[   22.210515] 52248cc5: 9e669a82 
(__check_heap_object+0xc2/0x110)
[   22.210516] d8fbd36b: 9f98c1387bb0 (0x9f98c1387bb0)
[   22.210518] fbaec228: 9e691abc 
(__check_object_size+0x14c/0x178)
[   22.210520] 75bbe0bd: 0003 (0x3)
[   22.210521] c59928fd: 916c551bae58 (0x916c551bae58)
[   22.210522] b21fd37b: 56306fd72ff0 (0x56306fd72ff0)
[   22.210523] d6eeec1d: 916c551bae58 (0x916c551bae58)
[   22.210524] 572c6e05: 9f98c1387bd8 (0x9f98c1387bd8)
[   22.210614] 586dbeef: c0ee6d26 (os_memcpy_to_user+0x26/0x50 
[nvidia])
[   22.210615] f8a4e252: 0003 (0x3)
[   22.210616] 1ec430c9:  ...
[   22.210617] ab4db71d: 56306fd72ff0 (0x56306fd72ff0)
[   22.210619] 8ab5a0d0: 916c551bae50 (0x916c551bae50)
[   22.210719] f7226ef5: c0e6cd15 (_nv001372rm+0xa5/0x260 
[nvidia])
[   22.210720] 27bdfa5e:  ...
[   22.210721] f700deb4: 916c53e0f3e8 (0x916c53e0f3e8)
[   22.210722] 83e0d8ce: 916c551baed8 (0x916c551baed8)
[   22.210723] e04851a1: 916c551bae80 (0x916c551bae80)
[   22.210831] a2adb8f1: c0aeb88a (_nv004784rm+0x4eba/0x5500 
[nvidia])
[   22.210832] 86514ed8:  ...
[   22.210834] 36331c54: 916c551baed8 (0x916c551baed8)
[   22.210835] 3936cf83: 7ffef6f565b0 (0x7ffef6f565b0)
[   22.210942] ab82187b: c0aebfbc (_nv004331rm+0xec/0xf0 
[nvidia])
[   22.210943] 9df1ed65: 916c551baed8 (0x916c551baed8)
[   22.210945] c1943ff4: 916c5292c008 (0x916c5292c008)
[   22.210946] 550cc597: 0010 (0x10)
[   22.210947] e46ff081: 7ffef6f565b0 (0x7ffef6f565b0)
[   22.210948] 7

[Desktop-packages] [Bug 1802622] Re: Ubuntu Cosmic nvidia-340 needs patch for "Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLUB object 'nvidia_stack_t'

2018-11-11 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: nvidia-graphics-drivers-340 (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-340 in Ubuntu.
https://bugs.launchpad.net/bugs/1802622

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

Status in nvidia-graphics-drivers-340 package in Ubuntu:
  Confirmed

Bug description:
  Since upgrading from Ubuntu 18.04 Bionic to Ubuntu 18.10 Cosmic, I've
  started seeing issues with getting into Xorg.

  My config:

  01:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GTS 250] 
(rev a2) (prog-if 00 [VGA controller])
  Subsystem: Gigabyte Technology Co., Ltd G92 [GeForce GTS 250]

  System Information
  Manufacturer: Gigabyte Technology Co., Ltd.
  Product Name: P55A-UD4

  Ubuntu 18.04 Cosmic w/nvidia-340 proprietary drivers.

  This appears to be, in part, due to a newer kernel with stricter
  permissions around kernel access.

  This seems to have been fixed in Debian:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88
  ... by backporting the fix from nvidia-390:
  https://bugzilla.redhat.com/show_bug.cgi?id=1570493
  https://bugzilla.redhat.com/attachment.cgi?id=1425704

  Could this patch also be applied to nvidia-340 for Ubuntu?

  Error I'm seeing on my own system (from dmesg):

  [   74.596816] resource sanity check: requesting [mem 0x000c-0x000f], 
which spans more than PCI Bus :00 [mem 0x000c-0x000d window]
  [   74.596945] caller os_map_kernel_space+0x9f/0xb0 [nvidia] mapping multiple 
BARs
  [   75.351656] [ cut here ]
  [   75.351661] Bad or missing usercopy whitelist? Kernel memory exposure 
attempt detected from SLUB object 'nvidia_stack_t' (offset 11864, size 3)!
  [   75.351675] WARNING: CPU: 7 PID: 4310 at mm/usercopy.c:81 
usercopy_warn+0x81/0xa0
  [   75.351676] Modules linked in: pci_stub vboxpci(OE) vboxnetadp(OE) 
vboxnetflt(OE) vboxdrv(OE) ipmi_devintf ipmi_msghandler ip6t_REJECT 
nf_reject_ipv6 nf_log_ipv6 xt_hl ip6t_rt snd_hda_codec_realtek 
nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT nf_reject_ipv4 input_leds 
nf_log_ipv4 nf_log_common nvidia_uvm(POE) xt_LOG snd_hda_codec_generic 
snd_hda_intel snd_hda_codec intel_powerclamp mxm_wmi snd_hda_core kvm_intel 
snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event kvm nvidia(POE) snd_rawmidi 
snd_seq snd_seq_device irqbypass drm snd_timer intel_cstate snd xt_limit 
i7core_edac serio_raw soundcore xt_tcpudp mac_hid wmi xt_addrtype 
nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack sch_fq_codel ip6table_filter it87 
hwmon_vid coretemp ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast 
nf_nat_ftp nf_nat
  [   75.351718]  parport_pc nf_conntrack_ftp nf_conntrack libcrc32c ppdev 
iptable_filter bpfilter sunrpc lp parport ip_tables x_tables autofs4 pata_acpi 
hid_generic usbhid hid gpio_ich firewire_ohci firewire_core crc_itu_t 
pata_it8213 r8169 lpc_ich i2c_i801 mii ahci libahci
  [   75.351737] CPU: 7 PID: 4310 Comm: Xorg Tainted: P   OE 
4.18.0-11-generic #12-Ubuntu
  [   75.351738] Hardware name: Gigabyte Technology Co., Ltd. 
P55A-UD4/P55A-UD4, BIOS F15 09/16/2010
  [   75.351741] RIP: 0010:usercopy_warn+0x81/0xa0
  [   75.351742] Code: 50 ac 41 51 4d 89 d8 48 c7 c0 89 8d 4f ac 49 89 f1 48 89 
f9 48 0f 45 c2 48 c7 c7 f0 a1 50 ac 4c 89 d2 48 89 c6 e8 f1 cf df ff <0f> 0b 48 
83 c4 18 c9 c3 48 c7 c6 b2 8a 52 ac 49 89 f1 49 89 f3 eb 
  [   75.351773] RSP: 0018:bcc5414f3b58 EFLAGS: 00010282
  [   75.351775] RAX:  RBX: 9eb29383ae58 RCX: 
0006
  [   75.351776] RDX: 0007 RSI: 0092 RDI: 
9eb29fdd64b0
  [   75.351777] RBP: bcc5414f3b70 R08: 0001 R09: 
03e1
  [   75.351778] R10: 0004 R11:  R12: 
0003
  [   75.351779] R13: 0001 R14: 9eb29383ae5b R15: 
9eb29383aea0
  [   75.351781] FS:  7ff9251eca80() GS:9eb29fdc() 
knlGS:
  [   75.351782] CS:  0010 DS:  ES:  CR0: 80050033
  [   75.351783] CR2: 7ff9207ca000 CR3: 00020f3f2000 CR4: 
06e0
  [   75.351785] Call Trace:
  [   75.351791]  __check_heap_object+0xc2/0x110
  [   75.351793]  __check_object_size+0x14c/0x178
  [   75.351936]  os_memcpy_to_user+0x26/0x50 [nvidia]
  [   75.352047]  _nv001372rm+0xa5/0x260 [nvidia]
  [   75.352050] WARNING: kernel stack frame pointer at 8342e4ff in 
Xorg:4310 has bad value 5ccb4a79
  [   75.352051] unwind stack type:0 next_sp:  (null) mask:0x2 
graph_idx:0
  [   75.352053] 84c91694: bcc5414f3b80 (0xbcc5414f3b80)
  [   75.352055] 4d93127f: ab669a82 
(__check_heap_object+0xc2/0x110)
  [