Bug 215017

Summary: security/hashcat: update to 3.20
Product: Ports & Packages Reporter: Nikolai Lifanov <lifanov>
Component: Individual Port(s)Assignee: Matthew Seaman <matthew>
Status: Closed FIXED    
Severity: Affects Some People CC: jcfyecrayz, matthew
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://raw.githubusercontent.com/hashcat/hashcat/v3.20/docs/changes.txt
Attachments:
Description Flags
security/hashcat: 3.10 -> 3.20 lifanov: maintainer-approval+

Description Nikolai Lifanov 2016-12-02 21:48:36 UTC
Created attachment 177621 [details]
security/hashcat: 3.10 -> 3.20

Please update security/hashcat to 3.20. The changelog is in the URL field.
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-12-03 08:43:42 UTC
A commit references this bug:

Author: matthew
Date: Sat Dec  3 08:42:45 UTC 2016
New revision: 427605
URL: https://svnweb.freebsd.org/changeset/ports/427605

Log:
  Update to 3.20

  ChangeLog: https://raw.githubusercontent.com/hashcat/hashcat/v3.20/docs/changes.txt

  PR:		215017
  Submitted by:	lifanov@mail.lifanov.com (maintainer)

Changes:
  head/security/hashcat/Makefile
  head/security/hashcat/distinfo
  head/security/hashcat/files/
  head/security/hashcat/files/patch-src_Makefile
  head/security/hashcat/files/patch-src_folder.c
  head/security/hashcat/pkg-plist
Comment 2 Matthew Seaman freebsd_committer freebsd_triage 2016-12-03 09:06:07 UTC
Committed, thanks!
Comment 3 John Hein 2016-12-08 18:38:20 UTC
3.20 fails for me...

% hashcat /dev/null
hashcat (v3.20) starting...

clGetPlatformIDs(): CL_UNKNOWN_ERROR



kdump shows:

   .
   .
 26821 hashcat  1481222218.103759 NAMI  "/usr/local/etc/OpenCL/vendors"
 26821 hashcat  1481222218.103770 RET   open -1 errno 2 No such file or directory
 26821 hashcat  1481222218.103778 CALL  write(0x2,0x484dd5,0x5)
 26821 hashcat  1481222218.103790 GIO   fd 2 wrote 5 bytes
       0x0000 1b5b 3331 6d                                                      |.[31m|

 26821 hashcat  1481222218.103793 RET   write 5
 26821 hashcat  1481222218.103796 CALL  write(0x2,0x80142902c,0x24)
 26821 hashcat  1481222218.103800 GIO   fd 2 wrote 36 bytes
       "clGetPlatformIDs(): CL_UNKNOWN_ERROR"
   .
   .
Comment 4 Nikolai Lifanov 2016-12-08 18:45:56 UTC
Hi!

From kdump, it looks like an OpenCL runtime is not configured. At a minimum, ocl-icd and one or more of pocl, clover, or beignet should be installed. Alternatively, hashcat-legacy port can be used if an OpenCL runtime can not be configured. Please refer to pkg-message for clarification.
Comment 5 Nikolai Lifanov 2016-12-08 18:51:14 UTC
As a background, the 3.x series merged hashcat and oclHashcat programs and old hashcat was renamed to hashcat-legacy, for which I made a port for users that can't get OpenCL to work. Some time after 9.3 and 10.1 are EOL, I'll add at least ocl-icd as a port dependency but until then the pkg-message describes what to do.
Comment 6 John Hein 2016-12-08 20:02:28 UTC
I had ocl-icd installed.  Installing clover helped (I have AMD graphics).  Thanks.

It seems like that should be mentioned more clearly somehow - trying to figure it out based on the current pkg-message isn't straightforward.  But specifying clover as a dependency isn't necessarily right if you don't have the right hardware.  I can't think of a solution for the dependency issue.  Maybe a list of the possible OpenCL providers in OPTIONS?  security/hashcat seems unusable without one.
Comment 7 John Hein 2016-12-08 20:08:07 UTC
When I use hashcat to work on a md5 hash from the password file, however, I get:

====================
% sudo /usr/local/bin/hashcat -m 500 p0
 .
 .
clBuildProgram(): CL_BUILD_PROGRAM_FAILURE

* Device #1: Kernel /usr/local/share/hashcat/OpenCL/m00500.cl build failure. Proceeding without this device.

Initializing device kernels and memory...^[[2K^Minput.cl:19:1: error: OpenCL does not support the 'static' storage class specifier
input.cl:117:1: error: OpenCL does not support the 'static' storage class specifier
input.cl:229:1: error: OpenCL does not support the 'static' storage class specifier
input.cl:341:1: error: OpenCL does not support the 'static' storage class specifier
input.cl:433:1: error: OpenCL does not support the 'static' storage class specifier
input.cl:515:1: error: OpenCL does not support the 'static' storage class specifier

====================
Comment 8 Nikolai Lifanov 2016-12-08 20:35:00 UTC
The symptom looks like your AMD GPU is not quite on the support matrix for FreeBSD + OpenCL. Try removing clover and installing pocl.

There are a few reasons why I don't want to set dependencies on these yet. There is nothing sane to "default" to: pocl is huge (pulls in llvm37), beignet doesn't build on 10.1 (which is where packages for 10.3 are built), and clover can actually break the program if an AMD GPU is installed that doesn't quite support OpenCL with FreeBSD. If all of these dependencies are disabled by default, package users will never see this as a hint that they should install something. Previously, hashcat also worked with freeocl, which is now removed (for good reasons). Information about post-install setup for packages typically goes into pkg-message file, which is where I link to the OpenCL page on the wiki and also suggest hashcat-legacy if that doesn't work.

Summary: in my opinion, at this time, depending on one or more of the backends will not serve majority of the users. Also, uninstall clover and install pocl.

------------------------------------------------------------------------------

Hi! In the future, can you open a new Bugzilla issue or ask about this on a mailing list or IRC for something like this please? This specific issue is marked as closed/fixed and it's hard to follow an issue workflow like this.