From: John Wood <john.wood@gmx.com>
To: kernelnewbies@kernelnewbies.org
Cc: John Wood <john.wood@gmx.com>
Subject: Re: [PATCH 0/4] Help to debug spinlocks
Date: Sun, 20 Dec 2020 12:47:08 +0100 [thread overview]
Message-ID: <20201220114708.GA11045@ubuntu> (raw)
In-Reply-To: <20201219114640.63024-1-john.wood@gmx.com>
On Sat, Dec 19, 2020 at 12:46:37PM +0100, John Wood wrote:
> Hi,
>
> I'm working in a new LSM to detect and mitigate any fork brute force
> attack against vulnerable userspace processes. I'm testing the detection
> method but I have found some problems that I think are related to locking
> since the kernel gets stuck but not crashes. This work is a WIP to obtain
> the v3 version. The mitigation, documentation and fine tunning detection
> are under construction.
>
> My problem is that I don't be able to find the cause of this behaviour and
> any help would be greatly appreciated.
I think that I have found the cause of the problem.
I acquired the brute_stats_ptr_lock in the task_fatal_signal hook without
disable interrupts. Then, the task_free hook was call from an IRQ context
and tried to acquire the same lock in a write state. This cause a deadlock.
Thanks anyway,
John Wood
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2020-12-20 11:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-19 11:46 [PATCH 0/4] Help to debug spinlocks John Wood
2020-12-19 11:46 ` [PATCH 1/4] security: Add LSM hook at the point where a task gets a fatal signal John Wood
2020-12-19 11:46 ` [PATCH 2/4] security/brute: Define a LSM and manage statistical data John Wood
2020-12-19 11:46 ` [PATCH 3/4] securtiy/brute: Detect a brute force attack John Wood
2020-12-20 11:47 ` John Wood [this message]
2020-12-20 20:06 ` [PATCH 0/4] Help to debug spinlocks Valdis Klētnieks
2020-12-21 18:02 ` John Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201220114708.GA11045@ubuntu \
--to=john.wood@gmx.com \
--cc=kernelnewbies@kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).