Page MenuHomeFreeBSD

geli: Allocate a UMA pool earlier
ClosedPublic

Authored by oshogbo on May 16 2024, 8:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 7:09 AM
Unknown Object (File)
Fri, Dec 6, 7:09 AM
Unknown Object (File)
Fri, Dec 6, 7:09 AM
Unknown Object (File)
Fri, Dec 6, 7:09 AM
Unknown Object (File)
Mon, Dec 2, 9:20 AM
Unknown Object (File)
Sun, Nov 24, 3:21 AM
Unknown Object (File)
Sat, Nov 23, 7:23 AM
Unknown Object (File)
Thu, Nov 21, 8:24 AM
Subscribers

Details

Summary

The functions g_eli_init_uma and g_eli_fini_uma are used to trace
the number of devices in GELI. There is an issue where the g_eli_create
function may fail before g_eli_init_uma is called, however
g_eli_fini_uma is still executed in the fail path. This can
incorrectly decrease the device count to zero, potentially leading to
the UMA pool being freed. Accessing the device after the pool has been
freed causes a system panic.

This commit resolves the issue by ensuring devices count is increassed
eariler.

PR: 278828
Reported by: Andre Albsmeier <mail@fbsd2.e4m.org>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This skip is not necessary any longer.

Wow. I'm surprised this bug went unnoticed for so long. Can you get the fix into 14.1 ?

This revision is now accepted and ready to land.May 16 2024, 8:57 PM
This revision was automatically updated to reflect the committed changes.