View Issue Details

IDProjectCategoryView StatusLast Update
0003063Kali LinuxGeneral Bugpublic2018-01-29 12:32
ReporterWilliam Assigned Tog0tmi1k  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionsuspended 
Product Version2016.1 
Summary0003063: keepass2 crashes with several mono exceptions when deleting groups within a keepass2 database
Description

While testing the migration to Kali Rolling, we observed and issue with Keepass2 that was not present with Kali Rolling where when an object is deleted from either an existing database, or a newly created database, with the latest package of Keepass2, after the application prompts for confirmation to delete the object, the left window produces a red 'x' and prompts if you want to save the database.

When executed from the console, keepass2 appears to crash with the following message when we delete the object from a new or existing database, but keepass2 still remains up:

(02/11/16 14:58:37)lorend@rad:~
$ keepass2
SendMessage (29360170, 0x112c, 0x4, 0x4)
System.OutOfMemoryException: Not enough memory to complete operation [GDI+ status: OutOfMemory]
at System.Drawing.GDIPlus.CheckStatus (Status status) <0x405c3360 + 0x001f3> in <filename unknown>:0
at System.Drawing.Graphics.DrawLine (System.Drawing.Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) <0x4078e4b0 + 0x000f7> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawLine (System.Drawing.Pen,int,int,int,int)
at System.Windows.Forms.TreeView.DrawNodeLines (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip, System.Drawing.Pen dash, Int32 x, Int32 y, Int32 middle) <0x407ec810 + 0x00163> in <filename unknown>:0
at System.Windows.Forms.TreeView.DrawTreeNode (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip) <0x407ebf40 + 0x00417> in <filename unknown>:0
at System.Windows.Forms.TreeView.Draw (Rectangle clip, System.Drawing.Graphics dc) <0x407eba40 + 0x0029b> in <filename unknown>:0
at System.Windows.Forms.TreeView.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) <0x407eb9e0 + 0x00047> in <filename unknown>:0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) <0x4070a350 + 0x00140> in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x40631c20 + 0x001f7> in <filename unknown>:0
at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message& m) <0x406c3360 + 0x000cb> in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x40631bf0 + 0x00024> in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x40631bb0 + 0x00036> in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x406304f0 + 0x0031c> in <filename unknown>:0

Keepass2 then prompts if you want to save the database. If you save the database, it then crashes with the following output:

Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.ThrowIfDisposedAndClosed () <0x40cbc720 + 0x0004b> in <filename unknown>:0
at System.Net.Sockets.Socket.Send (System.Byte[] buffer) <0x40ddb6b0 + 0x00023> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.WakeupMain () <0x40ddb5d0 + 0x00057> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SendAsyncMethod (System.Windows.Forms.AsyncMethodData method) <0x41da8e10 + 0x0022b> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) <0x40d5efe0 + 0x0032a> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.UnmapWindow (System.Windows.Forms.Hwnd hwnd, WindowType windows) <0x40e17200 + 0x00331> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetVisible (IntPtr handle, Boolean visible, Boolean activate) <0x40e103c0 + 0x002e3> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) <0x41dbe340 + 0x00028> in <filename unknown>:0
at System.Windows.Forms.XplatUI.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) <0x41dbe310 + 0x00029> in <filename unknown>:0
at System.Windows.Forms.NotifyIcon.HideSystray () <0x41dbe2a0 + 0x00043> in <filename unknown>:0
at System.Windows.Forms.NotifyIcon.Dispose (Boolean disposing) <0x41dbe230 + 0x00023> in <filename unknown>:0
at System.ComponentModel.Component.Finalize () <0x40dd7e80 + 0x0001d> in <filename unknown>:0
(02/11/16 15:06:20)lorend@rad:~
$

After deleting the object and saving the database, when we open the database back up, we get the following error messages:

(02/11/16 14:51:02)lorend@rad:~
$ keepass2 --debug
SendMessage (29360170, 0x112c, 0x4, 0x4)
System.OutOfMemoryException: Not enough memory to complete operation [GDI+ status: OutOfMemory]
at System.Drawing.GDIPlus.CheckStatus (Status status) <0x402ea360 + 0x001f3> in <filename unknown>:0
at System.Drawing.Graphics.DrawLine (System.Drawing.Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) <0x4049e850 + 0x000f7> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawLine (System.Drawing.Pen,int,int,int,int)
at System.Windows.Forms.TreeView.DrawNodeLines (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip, System.Drawing.Pen dash, Int32 x, Int32 y, Int32 middle) <0x40513f10 + 0x00163> in <filename unknown>:0
at System.Windows.Forms.TreeView.DrawTreeNode (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip) <0x40513640 + 0x00417> in <filename unknown>:0
at System.Windows.Forms.TreeView.Draw (Rectangle clip, System.Drawing.Graphics dc) <0x40513140 + 0x0029b> in <filename unknown>:0
at System.Windows.Forms.TreeView.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) <0x405130e0 + 0x00047> in <filename unknown>:0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) <0x404322e0 + 0x00140> in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x403594e0 + 0x001f7> in <filename unknown>:0
at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message& m) <0x403eb960 + 0x000cb> in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x403594b0 + 0x00024> in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x40359470 + 0x00036> in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x40357db0 + 0x0031c> in <filename unknown>:0

Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.ThrowIfDisposedAndClosed () <0x402b4720 + 0x0004b> in <filename unknown>:0
at System.Net.Sockets.Socket.Send (System.Byte[] buffer) <0x403d4270 + 0x00023> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.WakeupMain () <0x403d4190 + 0x00057> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SendAsyncMethod (System.Windows.Forms.AsyncMethodData method) <0x4051ecc0 + 0x0022b> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) <0x403578a0 + 0x0032a> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.UnmapWindow (System.Windows.Forms.Hwnd hwnd, WindowType windows) <0x404104d0 + 0x00331> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetVisible (IntPtr handle, Boolean visible, Boolean activate) <0x40409690 + 0x002e3> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) <0x4051fbf0 + 0x00028> in <filename unknown>:0
at System.Windows.Forms.XplatUI.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) <0x4051fbc0 + 0x00029> in <filename unknown>:0
at System.Windows.Forms.NotifyIcon.HideSystray () <0x4051fb50 + 0x00043> in <filename unknown>:0
at System.Windows.Forms.NotifyIcon.Dispose (Boolean disposing) <0x4051fae0 + 0x00023> in <filename unknown>:0
at System.ComponentModel.Component.Finalize () <0x403d0860 + 0x0001d> in <filename unknown>:0
(02/11/16 14:54:03)lorend@rad:~
$

If we choose to say 'Yes' when prompted to delete the the group, again we get the following output:

(02/11/16 15:14:38)lorend@rad:~
$ keepass2
SendMessage (29360170, 0x112c, 0x4, 0x4)
System.OutOfMemoryException: Not enough memory to complete operation [GDI+ status: OutOfMemory]
at System.Drawing.GDIPlus.CheckStatus (Status status) <0x40e28360 + 0x001f3> in <filename unknown>:0
at System.Drawing.Graphics.DrawLine (System.Drawing.Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) <0x40ff3a30 + 0x000f7> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawLine (System.Drawing.Pen,int,int,int,int)
at System.Windows.Forms.TreeView.DrawNodeLines (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip, System.Drawing.Pen dash, Int32 x, Int32 y, Int32 middle) <0x41051e40 + 0x00163> in <filename unknown>:0
at System.Windows.Forms.TreeView.DrawTreeNode (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip) <0x41051570 + 0x00417> in <filename unknown>:0
at System.Windows.Forms.TreeView.Draw (Rectangle clip, System.Drawing.Graphics dc) <0x41051070 + 0x0029b> in <filename unknown>:0
at System.Windows.Forms.TreeView.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) <0x41051010 + 0x00047> in <filename unknown>:0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) <0x40f6f400 + 0x00140> in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x40e96c20 + 0x001f7> in <filename unknown>:0
at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message& m) <0x40f28360 + 0x000cb> in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x40e96bf0 + 0x00024> in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x40e96bb0 + 0x00036> in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x40e954f0 + 0x0031c> in <filename unknown>:0

What is different, however, is if we say 'No' to saving the database, it appears to also crash but with no other error messages.

This environment consists of the following:

(02/11/16 15:18:28)lorend@rad:~
$ which keepass2
/usr/bin/keepass2
(02/11/16 15:18:50)lorend@rad:~
$ tyhpe keepass2
bash: tyhpe: command not found
(02/11/16 15:18:55)lorend@rad:~
$ tyhpe keepass2
bash: tyhpe: command not found
(02/11/16 15:18:58)lorend@rad:~
$
(02/11/16 15:18:58)lorend@rad:~
$ which keepass2
/usr/bin/keepass2
(02/11/16 15:18:59)lorend@rad:~
$ type keepass2
keepass2 is hashed (/usr/bin/keepass2)
(02/11/16 15:19:02)lorend@rad:~
$ file /usr/bin/keepass2
/usr/bin/keepass2: POSIX shell script, ASCII text executable
(02/11/16 15:19:19)lorend@rad:~
$ dpkg --search /usr/bin/keepass2
keepass2: /usr/bin/keepass2
(02/11/16 15:19:40)lorend@rad:~
$ dpkg --list keepass2
Desired=Unknown/Install/Remove/Purge/Holdr
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==========================-==================-==================-==========================================================
ii keepass2 2.31+dfsg-1 all Password manager
(02/11/16 15:19:57)lorend@rad:~
$ dpkg --status keepass2
Package: keepass2
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 2910
Maintainer: Debian CLI Applications Team <[email protected]>
Architecture: all
Version: 2.31+dfsg-1
Depends: mono-runtime (>= 3.0~), libmono-corlib4.5-cil (>= 4.2.0), libmono-system-drawing4.0-cil (>= 3.0.6), libmono-system-security4.0-cil (>= 1.0), libmono-system-windows-forms4.0-cil (>= 1.0), libmono-system-xml4.0-cil (>= 4.2.0), libmono-system4.0-cil (>= 4.2.0), libx11-6 (>= 2:1.6.0)
Recommends: xsel
Suggests: keepass2-doc, mono-dmcs, xdotool
Description: Password manager
KeePass is a easy-to-use password manager for Windows, Linux, Mac OS X and
mobile devices. You can store your passwords in highly-encrypted databases,
which can only be unlocked with one master password and/or a key file.
A database consists of only one file that can be transferred from one computer
to another easily.
KeePass can import data from various file formats. The password list can be
exported to various formats, including TXT, HTML, XML and CSV files.
Homepage: http://keepass.info/
(02/11/16 15:20:12)lorend@rad:~
$ uname -a
Linux rad 4.3.0-kali1-amd64 0000001 SMP Debian 4.3.3-7kali2 (2016-01-27) x86_64 GNU/Linux
(02/11/16 15:20:30)lorend@rad:~
$ free -m
total used free shared buff/cache available
Mem: 32095 2847 13591 77 15655 29085
Swap: 9911 0 9911
(02/11/16 15:20:36)lorend@rad:~
$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/dm-1 225G 16G 199G 8% /
(02/11/16 15:20:47)lorend@rad:~
$ cli -V
Mono JIT compiler version 4.2.1 (Debian 4.2.1.102+dfsg2-5)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
(02/11/16 15:21:06)lorend@rad:~
$ dpkg -s libc6 | grep ^Version
Version: 2.21-7
(02/11/16 15:23:18)lorend@rad:~
$

In closing, we believe this to be a bug with with the 2.31 package of Keepass2, and while a tools upgrade request was opened to upgrade keepass2 in issue 0001945, we believe that package 2.28 is more stable than the present package 2.31, so we propose backing out of version 2.31, going back to version 2.28, or identifying the issue causing this behavior in package 2.31, which is currently marked as 'unstable'.

Steps To Reproduce

This is reproducible in one of two ways, pending if you have an old Keepass2 database from another source.

If you do not have an old keepass2 database from another source, do the following:

  1. Running Kali Rolling 2016.1, with updated packages, as any user, open up 'gnome-terminal' and execute 'keepass2' from the command line.
  2. If prompted to 'Open Database - ', click 'Cancel'.
  3. When the 'Keepass' window opens up, click the 'New (CTRL +N)' button.
  4. When a 'Create New Password Database' file save dialog comes up, save the file anywhere using either the default name (NewDatabase.kdbx) or a name of your choosing as the 'File name' and selecting 'Save as type:' as 'Keepass KDBX Files (*.kdbx)'
  5. Click 'Save'
  6. If a file already exists, either specify a new file or overwrite the file you specified in step four by clicking 'OK' when the 'Save' dialog pops up.
  7. When the 'Create Composite Master Key' window shows up, ensure that 'Master Password' is checked and specify a password, such as 'asdf'. Then specify the same password in the 'Repeat Password' dialog box and click 'OK'
  8. When the 'Create New Password Database - Step 2' window pops up, within the 'Enter a name for the database or leave it empty' dialog of the 'General' tab, specify some value, such as 'asdf' and click 'OK'
  9. This will open up the main Keepass window with the newly created sample database. From here, click on the 'Save' icon. Then close the window.
  10. Execute 'keepass2' program again from 'gnome-terminal' as the same user. This should open up an 'Open Database - ' Window, prompting for a password to the database.
  11. Check the 'Master Password' box and specify the password provided in step 7 and click 'OK'
  12. Delete any group under the 'General' group name, such as 'Windows' or 'Network' by either selecting the object and pressing the 'delete' key or right clicking on the group object and selecting 'Delete Group'.
  13. When the 'Delete Group' dialog box pops up, asking 'Are you sure you want to move the selected group to the recycle bin?', click 'Yes'.
  14. When the 'KeePass - Save Before Close/Lock?' dialog box pops up, click the 'Yes' button.
  15. This should cause the program to close or crash.
  16. Attempt to open the database again as per step 10, noting that after providing the 'Master password' and clicking 'OK', the application will crash.

If you have an old keepass2 database from another source, execute steps 10 and on up above, specifying the old keepass2 database.

Additional Information

Package 2.31+dfsg-1 is listed as unstable as per packages.qa.debian.org/keepass2.html. Package 2.28 is the latest stable package. When we download and install package 2.28 on a fresh install of Kali Rolling 2016.1 and fresh updates, we do not face these issues.

We also notice that there is no 'Recycle Bin' object in the 2.31 version of Keepass2, which is odd. Regardless, even though the same behavior is observed with previous keepass2 databases, we attempted to recreate the 'Recycle Bin' group object as it is configred within the 2.28 package, but it still appears to crash when deleting objects.

This testing was conducted on two HP ZBooks 17G2 laptops, one running Kali 2 and run running Kali 2016.1, both with with 32GB's of Ram and an i7-4810MQ Intel processor as well as a Lenovo W520 with 32GB's of RAM and an i7- intel 2860 QM processor.

Attached Files
Selection_001.png (1,998,689 bytes)
new_database_delete_key.png (43,976 bytes)   
new_database_delete_key.png (43,976 bytes)   
william_new_database_reopen.png (36,002 bytes)   
william_new_database_reopen.png (36,002 bytes)   

Activities

William

William

2016-02-12 18:02

reporter   ~0004698

Hello,

Sorry this is so long. Just trying to provide as much information as possible.

So the testing we performed with keepass2 version 2.28 was performed on the Lenovo laptop, which allowed us to draw the potential conclusion that this was not an issue with the 2.28 version of the keepass2 package. However, after further testing, that conclusion might not be entirely accurate.

When we perform this test using the 2.28 version of the keepass2 package on the HP laptop that we were originally performing the testing on, as demonstrated in 'Selection_001.png' the issue still persists.

For what it's worth, this follow on testing was performed by initially, as the root user, purging the current keepass2 package from the system (apt-get remove --purge keepass2), validating that it was removed (some components were left behind such as icons), and installing the 2.28 version manually from 'https://packages.debian.org/source/stable/keepass2'. We then logged out of the profile and logged into a profile that had not logged into the system (e.g., fresh /etc/skel with fresh profile) and reproduced the issue with version 2.28. This leads us to believe that or original proposal was incorrect, leaving us to believe that something is messed up with this particular configuration or information system. Oddly enough, in both instances, we nuked and paved each information system with Kali 2016.1.

We will work to conduct additional testing to troubleshoot this issue further, but this does not appear to be so cut and dry.

To further assist with this issue, if so desired, I am willing to upload an impacted database created using version 2.28 of keepass2 after reproducing the issue, as well as an impacted database using version 2.31 of keepass2, naming them accordingly.

To further troubleshoot this issue, on another Lenovo laptop with the same hardware profile, simply with a fresh Kali 2016.1 install, we only installed keepass2 using 'apt-get install keepass2' and attempted to reproduce this issue as the 'root' user, and we can reproduce this issue where the application appears to crash and present a red 'x' in the left window. We then purged the 2.31 version of keepass2 using 'apt-get remove --purge keepass2' from the system and, while the sha1sum of both repo packages are the same, manually installed the older version from the Kali pool (http://http.kali.org/kali/pool/main/k/keepass2/keepass2_2.28+dfsg-1_all.deb). This time we were able to reproduce the issue.

One thing that we do know is that while exploring other options, we did install similar packages such as keepassx on the previous Lenovo laptop. Part of that effort involved installing 'mono-complete' so on the new Lenovo laptop we purged the keepass2 package, installed mono-complete on the same Lenovo laptop, reinstalled keepass2 from the kali repo, and attempted to reproduce the issue again, finding that it does crash as described. We then manually installed keepass2 version 2.28 from the Kali pool on the Lenovo laptop and attempted to reproduce the issue again, and it still crashes. From what we can tell, the one consistent piece of this involves the 'Recycle Bin', which does not appear to be present when we create a database.

Given such facts, we went back to our old Kali 2 workstations and observed a few things:

  1. When we create a database, there is no initial 'Recycle Bin', but the icons in the database are not 'skewed' in the left panel before saving, like they are on Kali 2016.1, as demonstrated 12 seconds in the uploaded video.
  2. When we delete an object from the database, it automatically creates a 'Recycle Bin' group.

Since this behavior is different, we saved a version of each database, one without a created 'Recycle Bin', created on the Kali 2 workstation using the keepass2 version 2.28 pulled from the Kali repo's. We then created another database, where we deleted a group object, which created a 'Recycle Bin' object, and saved the database. We then pulled both databases back to the second Lenovo laptop, purged and reinstalled the keepass2 package (version 2.21) from the Kali repo and attempted to open each database. When we opened up the database without the 'Recycle Bin' and it opened fine, but we were able to reproduce the issue as usual, however, when we attempted to open the keepass2 package with the 'Recycle Bin', it crashes, producing the following error:

root@kali-testing:~# keepass2
SendMessage (23068714, 0x112c, 0x4, 0x4)
System.OutOfMemoryException: Not enough memory to complete operation [GDI+ status: OutOfMemory]
at System.Drawing.GDIPlus.CheckStatus (Status status) <0x41257360 + 0x001f3> in <filename unknown>:0
at System.Drawing.Graphics.DrawLine (System.Drawing.Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) <0x413ffd80 + 0x000f7> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawLine (System.Drawing.Pen,int,int,int,int)
at System.Windows.Forms.TreeView.DrawNodeLines (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip, System.Drawing.Pen dash, Int32 x, Int32 y, Int32 middle) <0x414dc300 + 0x00163> in <filename unknown>:0
at System.Windows.Forms.TreeView.DrawTreeNode (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip) <0x414dba40 + 0x00417> in <filename unknown>:0
at System.Windows.Forms.TreeView.Draw (Rectangle clip, System.Drawing.Graphics dc) <0x4144b980 + 0x0029b> in <filename unknown>:0
at System.Windows.Forms.TreeView.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) <0x4144b920 + 0x00047> in <filename unknown>:0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) <0x4138cde0 + 0x00140> in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x412c4b60 + 0x001f7> in <filename unknown>:0
at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message& m) <0x41355c10 + 0x000cb> in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x412c4b30 + 0x00024> in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x412c4af0 + 0x00036> in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x412c3430 + 0x0031c> in <filename unknown>:0
System.NullReferenceException: Object reference not set to an instance of an object
at KeePassLib.PwDatabase.GetTotalObjectUuidCount () <0x414e3280 + 0x00031> in <filename unknown>:0
at KeePassLib.PwDatabase.HasDuplicateUuids () <0x414e3000 + 0x0002f> in <filename unknown>:0
at KeePass.Forms.MainForm.FixDuplicateUuids (KeePassLib.PwDatabase pd, KeePassLib.Serialization.IOConnectionInfo ioc) <0x414d2bd0 + 0x0003f> in <filename unknown>:0
at KeePass.Forms.MainForm.OpenDatabase (KeePassLib.Serialization.IOConnectionInfo ioConnection, KeePassLib.Keys.CompositeKey cmpKey, Boolean bOpenLocal) <0x41394a40 + 0x00dc7> in <filename unknown>:0
at KeePass.Forms.MainForm.OnFileOpen (System.Object sender, System.EventArgs e) <0x41450cb0 + 0x00017> in <filename unknown>:0
at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) <0x41450c20 + 0x00065> in <filename unknown>:0
at System.Windows.Forms.ToolStripButton.OnClick (System.EventArgs e) <0x41450b80 + 0x0004f> in <filename unknown>:0
at System.Windows.Forms.ToolStripItem.HandleClick (Int32 mouse_clicks, System.EventArgs e) <0x41450750 + 0x0007b> in <filename unknown>:0
at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, ToolStripItemEventType met) <0x41437220 + 0x000e1> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:FireEvent (System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) <0x41450490 + 0x001a7> in <filename unknown>:0
at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) <0x4142d430 + 0x00118> in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x412c4b60 + 0x00217> in <filename unknown>:0
at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) <0x41353a30 + 0x00013> in <filename unknown>:0
at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) <0x41358eb0 + 0x00013> in <filename unknown>:0
at KeePass.UI.CustomToolStripEx.WndProc (System.Windows.Forms.Message& m) <0x4135ab10 + 0x00017> in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x412c4b30 + 0x00024> in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x412c4af0 + 0x00036> in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x412c3430 + 0x0031c> in <filename unknown>:0

Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'.
at System.Net.Sockets.Socket.ThrowIfDisposedAndClosed () <0x41221720 + 0x0004b> in <filename unknown>:0
at System.Net.Sockets.Socket.Send (System.Byte[] buffer) <0x4133f7b0 + 0x00023> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.WakeupMain () <0x4133f6d0 + 0x00057> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SendAsyncMethod (System.Windows.Forms.AsyncMethodData method) <0x413a7210 + 0x0022b> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg message, IntPtr wParam, IntPtr lParam) <0x412c2f40 + 0x0032a> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.UnmapWindow (System.Windows.Forms.Hwnd hwnd, WindowType windows) <0x4137b2e0 + 0x00331> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetVisible (IntPtr handle, Boolean visible, Boolean activate) <0x413743d0 + 0x002e3> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) <0x414e6600 + 0x00028> in <filename unknown>:0
at System.Windows.Forms.XplatUI.SystrayRemove (IntPtr handle, System.Windows.Forms.ToolTip& tt) <0x414e65d0 + 0x00029> in <filename unknown>:0
at System.Windows.Forms.NotifyIcon.HideSystray () <0x414e6560 + 0x00043> in <filename unknown>:0
at System.Windows.Forms.NotifyIcon.Dispose (Boolean disposing) <0x414e64f0 + 0x00023> in <filename unknown>:0
at System.ComponentModel.Component.Finalize () <0x4133beb0 + 0x0001d> in <filename unknown>:0
root@kali-testing:~#

We then purged the keepass2 2.31 version from the laptop, installed the 2.28 version pulled from the Kali repo and attempted to open up each database generated from the Kali 2 workstation. The first database without the 'Recycle Bin' opens, but again crashes when we attempt to delete an object. When we attempt to open up the second database with the 'Recycle Bin' object, it again crashes, producing the following:

root@kali-testing:~# keepass2
SendMessage (23068714, 0x112c, 0x4, 0x4)
SendMessage (23068708, 0x101f, (nil), (nil))
SendMessage (0, 0x1203, (nil), 0x7ffc305889e0)
SendMessage (0, 0x1204, (nil), 0x7ffc305889e0)
SendMessage (0, 0x1203, 0x1, 0x7ffc305889e0)
SendMessage (0, 0x1204, 0x1, 0x7ffc305889e0)
SendMessage (0, 0x1203, 0x2, 0x7ffc305889e0)
SendMessage (0, 0x1204, 0x2, 0x7ffc305889e0)
SendMessage (0, 0x1203, 0x3, 0x7ffc305889e0)
SendMessage (0, 0x1204, 0x3, 0x7ffc305889e0)
SendMessage (0, 0x1203, 0x4, 0x7ffc305889e0)
SendMessage (0, 0x1204, 0x4, 0x7ffc305889e0)
SendMessage (23068708, 0x101f, (nil), (nil))
SendMessage (0, 0x1203, (nil), 0x7ffc30589c40)
SendMessage (0, 0x1204, (nil), 0x7ffc30589c40)
SendMessage (0, 0x1203, 0x1, 0x7ffc30589c40)
SendMessage (0, 0x1204, 0x1, 0x7ffc30589c40)
SendMessage (0, 0x1203, 0x2, 0x7ffc30589c40)
SendMessage (0, 0x1204, 0x2, 0x7ffc30589c40)
SendMessage (0, 0x1203, 0x3, 0x7ffc30589c40)
SendMessage (0, 0x1204, 0x3, 0x7ffc30589c40)
SendMessage (0, 0x1203, 0x4, 0x7ffc30589c40)
SendMessage (0, 0x1204, 0x4, 0x7ffc30589c40)
System.OutOfMemoryException: Not enough memory to complete operation [GDI+ status: OutOfMemory]
at System.Drawing.GDIPlus.CheckStatus (Status status) <0x40e8d360 + 0x001f3> in <filename unknown>:0
at System.Drawing.Graphics.DrawLine (System.Drawing.Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) <0x40ff4ba0 + 0x000f7> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawLine (System.Drawing.Pen,int,int,int,int)
at System.Windows.Forms.TreeView.DrawNodeLines (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip, System.Drawing.Pen dash, Int32 x, Int32 y, Int32 middle) <0x410be060 + 0x00163> in <filename unknown>:0
at System.Windows.Forms.TreeView.DrawTreeNode (System.Windows.Forms.TreeNode node, System.Drawing.Graphics dc, Rectangle clip) <0x410bd7a0 + 0x00417> in <filename unknown>:0
at System.Windows.Forms.TreeView.Draw (Rectangle clip, System.Drawing.Graphics dc) <0x4102cc00 + 0x0029b> in <filename unknown>:0
at System.Windows.Forms.TreeView.OnPaintInternal (System.Windows.Forms.PaintEventArgs pe) <0x4102cba0 + 0x00047> in <filename unknown>:0
at System.Windows.Forms.Control.WmPaint (System.Windows.Forms.Message& m) <0x40fbe620 + 0x00140> in <filename unknown>:0
at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) <0x40ed3340 + 0x001f7> in <filename unknown>:0
at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message& m) <0x40f8cc10 + 0x000cb> in <filename unknown>:0
at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) <0x40ed3310 + 0x00024> in <filename unknown>:0
at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) <0x40ed32d0 + 0x00036> in <filename unknown>:0
at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) <0x40ed1c10 + 0x0031c> in <filename unknown>:0
root@kali-testing:~#

Oddly enough, additional testing with the database that does not contain a 'Recycle Bin' group object where we delete 'key' from the right window, it will not crash, but it will create an object like 'Recycle Bin', without a text label (icon only), with the deleted key found in the folder. Please see the 'new_database_delete_key.png' file for reference. We can then further open that database, but the icons on the left window are all screwed up, as described before. Please see reference figure 'william_new_database_reopen.png' demonstrating this. We then attempt to delete a group object on the left, and it crashes as before with the 'Cannot acces a disposed object' error referenced above.

One last thing to point out is that on Kali 2016.1, we are able to open and modify the keepass2 generated databases, be they generated from a Kali 2 workstation, or a Kali 2016.1 workstation, using the kpcli utility.

Outside of nuke and paving the HP laptop again, installing Kali 2016.1, and then only install Keepass2 and whatever dependencies it produces from the official Kali repo's using 'apt-get install keepass2' we do not know how to proceed. Any further assistance is appreciated.

g0tmi1k

g0tmi1k

2018-01-29 12:32

administrator   ~0008142

Due to the age of the OS (Kali Moto [v1], Kali Safi [v2], Kali Rolling 2016.x), these legacy versions are no longer supported.
We will be closing this ticket due to inactivity.

Please could you see if you are able to replicate this issue with the latest version of Kali Linux - https://www.kali.org/downloads/)?

If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing,and also give information about your setup?
For more information, please read: https://kali.training/topic/filing-a-good-bug-report/

Issue History

Date Modified Username Field Change
2016-02-12 00:22 William New Issue
2016-02-12 00:22 William File Added: Screencast_02-11-2016_04:20:23 PM.webm
2016-02-12 16:43 William File Added: Selection_001.png
2016-02-12 18:02 William Note Added: 0004698
2016-02-12 18:02 William File Added: new_database_delete_key.png
2016-02-12 18:03 William File Added: william_new_database_reopen.png
2018-01-29 12:32 g0tmi1k Assigned To => g0tmi1k
2018-01-29 12:32 g0tmi1k Status new => closed
2018-01-29 12:32 g0tmi1k Resolution open => suspended
2018-01-29 12:32 g0tmi1k Note Added: 0008142