Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162216418
D41280.id125434.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
904 B
Referenced Files
None
Subscribers
None
D41280.id125434.diff
View Options
diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c
--- a/sys/kern/subr_kdb.c
+++ b/sys/kern/subr_kdb.c
@@ -503,11 +503,19 @@
}
static bool
-kdb_backend_permitted(struct kdb_dbbe *be, struct ucred *cred)
+kdb_backend_permitted(struct kdb_dbbe *be, struct thread *td)
{
+ struct ucred *cred;
int error;
- error = securelevel_gt(cred, kdb_enter_securelevel);
+ cred = td->td_ucred;
+ if (cred == NULL) {
+ KASSERT(td == &thread0 && cold,
+ ("%s: missing cred for %p", __func__, td));
+ error = 0;
+ } else {
+ error = securelevel_gt(cred, kdb_enter_securelevel);
+ }
#ifdef MAC
/*
* Give MAC a chance to weigh in on the policy: if the securelevel is
@@ -776,7 +784,7 @@
cngrab();
for (;;) {
- if (!kdb_backend_permitted(be, curthread->td_ucred)) {
+ if (!kdb_backend_permitted(be, curthread)) {
/* Unhandled breakpoint traps are fatal. */
handled = 1;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 11:43 PM (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34979719
Default Alt Text
D41280.id125434.diff (904 B)
Attached To
Mode
D41280: kdb: Permit a NULL thread credential in kdb_backend_permitted()
Attached
Detach File
Event Timeline
Log In to Comment