Bug 2281022 - Missing MTE-accelerated KASAN: CONFIG_KASAN_HW_TAGS
Summary: Missing MTE-accelerated KASAN: CONFIG_KASAN_HW_TAGS
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-17 19:13 UTC by jvoisin
Modified: 2025-04-27 19:22 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-06-26 18:28:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description jvoisin 2024-05-17 19:13:48 UTC
1. Please describe the problem:

There is a new kernel option in town, `CONFIG_KASAN_HW_TAGS`, making use of aarch64's MTE/TBI to power KASAN. The performance impact is super-duper-low, and it'll likely uncover memory corruption issues. The main drawback is that, well, it'll find memory corruption issues, but this can be mitigated by using `kasan.fault=report`, so that the issues will be reported and the kernel won't be panic'ed. Another mitigating factor is that statistically ~nobody is running fedora on aarch64, except via the asahi linux remix, so the number of affected users should be low-ish.

It's currently enabled by default on android: https://source.android.com/docs/security/test/memory-safety/arm-mte#mte-in-kernel


2. What is the Version-Release number of the kernel:

N/A

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

No

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

Compile the kernel with the proper option, notice that it doesn't break anything, doesn't tank the performances, and results in some "memory corruption in kernel-land, oh no :<" message from time to time.

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

N/A

6. Are you running any modules that not shipped with directly Fedora's kernel?:

N/A

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

N/A

Reproducible: Always

Comment 1 Justin M. Forbes 2024-06-26 18:28:55 UTC
While KASAN is only enabled for debug kernels, I have turned this on in rawhide and it will roll out as 6.10 rebases are done.

Comment 2 jvoisin 2024-08-18 22:32:25 UTC
The [documentation]( https://www.kernel.org/doc/html/latest/dev-tools/kasan.html ) states:

> Hardware Tag-Based KASAN or HW_TAGS KASAN, enabled with CONFIG_KASAN_HW_TAGS, is the mode intended to be used as an in-field memory bug detector or as a security mitigation. This mode only works on arm64 CPUs that support MTE (Memory Tagging Extension), but it has low memory and performance overheads and thus can be used in production.

Would it be possible to enable it for the prod kernel as well on aarch64?

Comment 3 Aoife Moloney 2025-04-25 10:45:30 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Neal Gompa 2025-04-27 19:08:01 UTC
Still an issue now, marked as such.


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