Bug 1932946 - bitlk: crypt_init_by_name_and_header() dereferences NULL pointer when data device device for active dm-crypt disappeared
Summary: bitlk: crypt_init_by_name_and_header() dereferences NULL pointer when data de...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: cryptsetup
Version: 33
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Milan Broz
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:e44fa75fbdc3145f619713eb6ca...
: 1933231 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-25 13:23 UTC by Tom Sundberg
Modified: 2021-03-27 01:23 UTC (History)
5 users (show)

Fixed In Version: cryptsetup-2.3.5-2.fc34 cryptsetup-2.3.5-2.fc33 cryptsetup-2.3.5-2.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-19 20:11:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (100.23 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: core_backtrace (19.31 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: cpuinfo (2.53 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: dso_list (6.04 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: environ (332 bytes, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: exploitable (82 bytes, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: limits (1.29 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: maps (39.86 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: mountinfo (3.19 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: open_fds (1.96 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: proc_pid_status (1.30 KB, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details
File: var_log_messages (796 bytes, text/plain)
2021-02-25 13:23 UTC, Tom Sundberg
no flags Details

Description Tom Sundberg 2021-02-25 13:23:02 UTC
Description of problem:
I had a virt-manager VM running, and I redirected a flashdrive to the virtual machine. Disks wouldn't open after un-redirecting the flashdrive.

Version-Release number of selected component:
udisks2-2.9.1-2.fc33

Additional info:
reporter:       libreport-2.14.0
backtrace_rating: 4
cgroup:         0::/system.slice/udisks2.service
cmdline:        /usr/libexec/udisks2/udisksd
crash_function: device_open
executable:     /usr/libexec/udisks2/udisksd
journald_cursor: s=060ed13377974d77b9539b16e664e224;i=b7a11;b=cd3487d4ec4a49f386396e20fbbe8808;m=a87804190;t=5bc2829b3180a;x=39d164b042171725
kernel:         5.10.16-200.fc33.x86_64
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (9 frames)
 #0 device_open at lib/utils_device.c:303
 #1 BITLK_read_sb at lib/bitlk/bitlk.c:470
 #2 _crypt_load_bitlk.constprop.0 at lib/setup.c:988
 #3 _init_by_name_crypt at lib/setup.c:1296
 #4 crypt_init_by_name_and_header at lib/setup.c:1486
 #5 _crypto_close at crypto.c:1132
 #6 run_task_job at udisksthreadedjob.c:214
 #7 g_task_thread_pool_thread at ../gio/gtask.c:1417
 #9 g_thread_proxy at ../glib/gthread.c:820

Comment 1 Tom Sundberg 2021-02-25 13:23:07 UTC
Created attachment 1759310 [details]
File: backtrace

Comment 2 Tom Sundberg 2021-02-25 13:23:09 UTC
Created attachment 1759311 [details]
File: core_backtrace

Comment 3 Tom Sundberg 2021-02-25 13:23:10 UTC
Created attachment 1759312 [details]
File: cpuinfo

Comment 4 Tom Sundberg 2021-02-25 13:23:12 UTC
Created attachment 1759313 [details]
File: dso_list

Comment 5 Tom Sundberg 2021-02-25 13:23:13 UTC
Created attachment 1759314 [details]
File: environ

Comment 6 Tom Sundberg 2021-02-25 13:23:14 UTC
Created attachment 1759315 [details]
File: exploitable

Comment 7 Tom Sundberg 2021-02-25 13:23:17 UTC
Created attachment 1759316 [details]
File: limits

Comment 8 Tom Sundberg 2021-02-25 13:23:19 UTC
Created attachment 1759317 [details]
File: maps

Comment 9 Tom Sundberg 2021-02-25 13:23:21 UTC
Created attachment 1759318 [details]
File: mountinfo

Comment 10 Tom Sundberg 2021-02-25 13:23:23 UTC
Created attachment 1759319 [details]
File: open_fds

Comment 11 Tom Sundberg 2021-02-25 13:23:26 UTC
Created attachment 1759320 [details]
File: proc_pid_status

Comment 12 Tom Sundberg 2021-02-25 13:23:28 UTC
Created attachment 1759321 [details]
File: var_log_messages

Comment 13 Tom Sundberg 2021-02-26 06:44:19 UTC
*** Bug 1933231 has been marked as a duplicate of this bug. ***

Comment 14 Tomáš Bžatek 2021-03-01 16:34:16 UTC
Reassigning to cryptsetup. The invocation of crypt_init_by_name_and_header() from libblockdev side looks sane on a first sight.

Comment 15 Milan Broz 2021-03-01 19:48:33 UTC
Yes, this uncovered a bug in libcryptsetup when it is called on an active Bitlocker mapping but the underlying device already disappeared.
Fix will be included in the next stable release.

Comment 17 Fedora Update System 2021-03-11 14:33:44 UTC
FEDORA-2021-17c262e08d has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-17c262e08d

Comment 18 Fedora Update System 2021-03-11 14:33:47 UTC
FEDORA-2021-28e528d2b6 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2021-28e528d2b6

Comment 19 Fedora Update System 2021-03-11 14:33:50 UTC
FEDORA-2021-3a694e18c9 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-3a694e18c9

Comment 20 Fedora Update System 2021-03-11 19:52:02 UTC
FEDORA-2021-17c262e08d has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-17c262e08d`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-17c262e08d

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2021-03-12 00:19:22 UTC
FEDORA-2021-3a694e18c9 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-3a694e18c9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-3a694e18c9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 22 Fedora Update System 2021-03-12 00:21:30 UTC
FEDORA-2021-28e528d2b6 has been pushed to the Fedora 32 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-28e528d2b6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-28e528d2b6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2021-03-19 20:11:49 UTC
FEDORA-2021-17c262e08d has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2021-03-23 01:32:11 UTC
FEDORA-2021-3a694e18c9 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2021-03-27 01:23:15 UTC
FEDORA-2021-28e528d2b6 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.