Bug 247744 - www/chromium: crash when U2F is used
Summary: www/chromium: crash when U2F is used
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Oleksandr Tymoshenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-03 17:09 UTC by Henry Hu
Modified: 2020-08-15 21:03 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (chromium)


Attachments
fix-chromium-hid-service.patch (11.81 KB, patch)
2020-07-22 04:02 UTC, Oleksandr Tymoshenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2020-07-03 17:09:54 UTC
This seems to be a repeat of PR 196754. To test it, just access 
https://demo.yubico.com/webauthn-technical/registration and click "Next". 

Seems like a null pointer:
(gdb) x/10i $rip
=> 0x517df60:   mov    (%rsi),%rax
   0x517df63:   mov    %r14,%rdi
   0x517df66:   mov    %rbx,%rdx
   0x517df69:   callq  *0x20(%rax)
   0x517df6c:   mov    %r14,%rax
   0x517df6f:   pop    %rbx
   0x517df70:   pop    %r14
   0x517df72:   pop    %rbp
   0x517df73:   retq
   0x517df74:   int3
(gdb) p $rsi
$1 = 0

Without debug symbol it's hard to get deeper.
Comment 1 Xin LI freebsd_committer freebsd_triage 2020-07-18 23:54:37 UTC
+gonzo@
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2020-07-19 00:03:44 UTC
I'll take a look
Comment 3 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2020-07-22 04:02:53 UTC
Created attachment 216649 [details]
fix-chromium-hid-service.patch

This patch fixes the crash and make U2F functional. There is an issue
with repeated access: if you try to perform two operations in row the
second one fails. Re-try then succeeds. I'm not sure if it's a new
problem or pre-existing issue with FreeBSD's HID implementation and
will take look later.
Comment 4 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2020-07-22 04:04:47 UTC
Adding chromium@freebsd.org. Can port committers on that list take a look at the patch and commit it? I don't have ports commit bit.
Comment 5 robert.ayrapetyan 2020-08-03 22:32:15 UTC
Same issue, patch works, thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-08-15 20:55:15 UTC
A commit references this bug:

Author: jrm
Date: Sat Aug 15 20:55:07 UTC 2020
New revision: 545068
URL: https://svnweb.freebsd.org/changeset/ports/545068

Log:
  www/chromium: Fix U2F authentication

  PR:		247744
  Submitted by:	gonzo
  Reported by:	Henry Hu <henry.hu.sh@gmail.com>
  MFH:		(blanket: bug/crash fix)

Changes:
  head/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc
  head/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.h
  head/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc
  head/www/chromium/files/patch-services_device_hid_hid__service__freebsd.h
Comment 7 Joseph Mingrone freebsd_committer freebsd_triage 2020-08-15 20:58:54 UTC
Thanks for reporting Henry and thanks for the patch Oleksandr.  Tested and committed.  Please re-open if necessary.
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-08-15 21:03:17 UTC
A commit references this bug:

Author: jrm
Date: Sat Aug 15 21:02:35 UTC 2020
New revision: 545069
URL: https://svnweb.freebsd.org/changeset/ports/545069

Log:
  MFH: r545067 r545068

  www/chromium: Update to version 84.0.4147.125

  Upstream changes:
  https://chromereleases.googleblog.com/2020/08/stable-channel-update-for-desktop.html

  --

  www/chromium: Fix U2F authentication

  PR:		247744
  Submitted by:	gonzo
  Reported by:	Henry Hu <henry.hu.sh@gmail.com>

  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2020Q3/
  branches/2020Q3/www/chromium/Makefile
  branches/2020Q3/www/chromium/distinfo
  branches/2020Q3/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.cc
  branches/2020Q3/www/chromium/files/patch-services_device_hid_hid__connection__freebsd.h
  branches/2020Q3/www/chromium/files/patch-services_device_hid_hid__service__freebsd.cc
  branches/2020Q3/www/chromium/files/patch-services_device_hid_hid__service__freebsd.h