Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mojave: EXC_BAD_ACCESS (SIGSEGV) after importing #7

Open
caramdache opened this issue Nov 15, 2018 · 4 comments
Open

Mojave: EXC_BAD_ACCESS (SIGSEGV) after importing #7

caramdache opened this issue Nov 15, 2018 · 4 comments

Comments

@caramdache
Copy link

Steps to reproduce:

  1. Export on MacBook Air running Mojave
  2. Transfer file
  3. Import on brand new MacBook Pro running Mojave
  4. Run Keychain.app
  5. Scroll down. After 4 pages, Keychain will crash with the following error.
Process:               Keychain Access [14513]
Path:                  /Applications/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access
Identifier:            com.apple.keychainaccess
Version:               10.5 (55237.220.1)
Build Info:            KeychainAccess-55237220001000000~105
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Keychain Access [14513]
User ID:               501

Date/Time:             2018-11-15 08:07:07.230 +0100
OS Version:            Mac OS X 10.14.1 (18B75)
Report Version:        12
Bridge OS Version:     3.1 (16P1065)
Anonymous UUID:        C7CB0C10-B4F2-6ED0-77FA-F29DBCD7C577

Sleep/Wake UUID:       A8DF03D8-0031-4A7F-9C63-950760D50213

Time Awake Since Boot: 19000 seconds
Time Since Wake:       2500 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000004
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [14513]

VM Regions Near 0x4:
--> 
    __TEXT                 0000000104f59000-0000000104fbb000 [  392K] r-x/rwx SM=COW  /Applications/Utilities/Keychain Access.app/Contents/MacOS/Keychain Access

Application Specific Information:
dyld3 mode

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.security            	0x00007fff5221fef3 Security::NameValueDictionary::NameValueDictionary(Security::CssmData const&) + 77
1   com.apple.security            	0x00007fff523d0a71 SecKeychainItemCopyFromPersistentReference + 319
2   com.apple.security            	0x00007fff5221dd70 SecIdentityCopyPreference + 873
3   com.apple.keychainaccess      	0x0000000104f77f41 0x104f59000 + 126785
4   com.apple.keychainaccess      	0x0000000104f760cb 0x104f59000 + 118987
5   com.apple.AppKit              	0x00007fff43e01a5e -[NSTableView preparedCellAtColumn:row:] + 473
6   com.apple.AppKit              	0x00007fff44095db6 -[NSOutlineView preparedCellAtColumn:row:] + 51
7   com.apple.AppKit              	0x00007fff43e01704 -[NSTableView _drawContentsAtRow:column:withCellFrame:] + 47
8   com.apple.AppKit              	0x00007fff44095d22 -[NSOutlineView _drawContentsAtRow:column:withCellFrame:] + 77
9   com.apple.AppKit              	0x00007fff43e00e4e -[NSTableView drawRow:clipRect:] + 2011
10  com.apple.AppKit              	0x00007fff43e001f1 -[NSTableView drawRowIndexes:clipRect:] + 500
11  com.apple.AppKit              	0x00007fff44093d2f -[NSOutlineView drawRowIndexes:clipRect:] + 98
12  com.apple.AppKit              	0x00007fff43dfdfc3 -[NSTableView drawRect:] + 1341
13  com.apple.AppKit              	0x00007fff43dfa755 _NSViewDrawRect + 66
14  com.apple.AppKit              	0x00007fff43df900d -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:] + 1545
15  com.apple.AppKit              	0x00007fff43df89f2 __46-[NSView(NSLayerKitGlue) drawLayer:inContext:]_block_invoke + 192
16  com.apple.AppKit              	0x00007fff43df8751 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] + 1769
17  com.apple.AppKit              	0x00007fff43ece780 -[_NSBackingLayerContents drawLayer:inContext:] + 165
18  com.apple.QuartzCore          	0x00007fff51748d6e -[CALayer drawInContext:] + 281
19  com.apple.AppKit              	0x00007fff43ece3da -[_NSTiledLayer drawTile:inContext:] + 605
20  com.apple.AppKit              	0x00007fff43ece123 -[_NSTiledLayerContents drawLayer:inContext:] + 181
21  com.apple.QuartzCore          	0x00007fff51748d6e -[CALayer drawInContext:] + 281
22  com.apple.AppKit              	0x00007fff43ece063 -[NSTileLayer drawInContext:] + 148
23  com.apple.QuartzCore          	0x00007fff51735a83 CABackingStoreUpdate_ + 577
24  com.apple.QuartzCore          	0x00007fff5179682d invocation function for block in CA::Layer::display_() + 53
25  com.apple.QuartzCore          	0x00007fff51734c78 -[CALayer _display] + 1839
26  com.apple.AppKit              	0x00007fff43ecdfab -[NSTileLayer display] + 114
27  com.apple.AppKit              	0x00007fff43ecc46a -[_NSTiledLayerContents update:shouldCallPrepareContent:] + 4780
28  com.apple.AppKit              	0x00007fff43ecaf2a -[_NSTiledLayer display] + 411
29  com.apple.QuartzCore          	0x00007fff517341a4 CA::Layer::display_if_needed(CA::Transaction*) + 634
30  com.apple.QuartzCore          	0x00007fff5172242f CA::Context::commit_transaction(CA::Transaction*) + 319
31  com.apple.QuartzCore          	0x00007fff51721d00 CA::Transaction::commit() + 576
32  com.apple.AppKit              	0x00007fff44043d56 -[_NSScrollingConcurrentMainThreadSynchronizer _synchronize:completionHandler:] + 331
33  com.apple.AppKit              	0x00007fff44043bd9 __80-[_NSScrollingConcurrentMainThreadSynchronizer initWithSharedData:constantData:]_block_invoke + 145
34  libdispatch.dylib             	0x00007fff7390ddcf _dispatch_client_callout + 8
35  libdispatch.dylib             	0x00007fff739105dc _dispatch_continuation_pop + 427
36  libdispatch.dylib             	0x00007fff7391f8ed _dispatch_source_invoke + 2013
37  libdispatch.dylib             	0x00007fff73918e25 _dispatch_main_queue_callback_4CF + 807
38  com.apple.CoreFoundation      	0x00007fff4677ae8b __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
39  com.apple.CoreFoundation      	0x00007fff4677a59a __CFRunLoopRun + 2335
40  com.apple.CoreFoundation      	0x00007fff46779a28 CFRunLoopRunSpecific + 463
41  com.apple.HIToolbox           	0x00007fff45a12b35 RunCurrentEventLoopInMode + 293
42  com.apple.HIToolbox           	0x00007fff45a1286b ReceiveNextEventCommon + 618
43  com.apple.HIToolbox           	0x00007fff45a125e8 _BlockUntilNextEventMatchingListInModeWithFilter + 64
44  com.apple.AppKit              	0x00007fff43cceeb7 _DPSNextEvent + 997
45  com.apple.AppKit              	0x00007fff43ccdc56 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1362
46  com.apple.AppKit              	0x00007fff43cc7cb9 -[NSApplication run] + 699
47  com.apple.AppKit              	0x00007fff43cb73f7 NSApplicationMain + 780
48  libdyld.dylib                 	0x00007fff7395c08d start + 1
@lifepillar
Copy link
Owner

Nice 🙂 This should be reported to Apple as a critical issue. It may be that my script sends bad input to KA, but in no way should the app crash.

I’ll try to reproduce it. Do you have any idea what could be the culprit? E.g., have you tried importing just a few records at a time to narrow down which ones may cause trouble?

@caramdache
Copy link
Author

caramdache commented Nov 15, 2018

It's a little difficult to debug given there are 667 entries in the keychain unfortunately. BTW, is there a reason that out of these 667 entries, only 521 appear in the exported CSV file? And is there any way to restrict the export to only certain types, like Internet Password?

@caramdache
Copy link
Author

And how I import the entries into the iCloud keychain instead? I've always found weird that Apple has kept both and don't quite understand why some entries endup in one or the other keychain for no obvious reason.

@lifepillar
Copy link
Owner

is there a reason that out of these 667 entries, only 521 appear in the exported CSV file?

Things that are not exported are likely not passwords, e.g., certificates, private keys, etc…

is there any way to restrict the export to only certain types, like Internet Password?

Currently, there isn't. But you can post-process the CSV output, e.g., in Numbers or Excel.

And how I import the entries into the iCloud keychain instead?

iCloud keychain uses a completely different format. CSVKeychain uses the system's security command-line tool to import/export items, and AFAIK it does not work with iCloud keychains. What you can do is

  • create a new keychain (Keychain Access > File > New Keychain…);
  • import items in the newly created keychain;
  • select and copy the imported items (or the ones that you want to copy into iCloud);
  • select the iCloud keychain and paste.

You will likely be asked to insert a password for each pasted item: when the first dialog appears, you may launch the script in the Readme to automate the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants