In the Linux kernel, the following vulnerability has been resolved:
tracing: Make sure trace_printk() can output as soon as it can be used
Currently traceprintk() can be used as soon as earlytraceinit() is called from startkernel(). But if a crash happens, and "ftracedumpon_oops" is set on the kernel command line, all you get will be:
[ 0.456075] <idle>-0 0dN.2. 347519us : Unknown type 6 [ 0.456075] <idle>-0 0dN.2. 353141us : Unknown type 6 [ 0.456075] <idle>-0 0dN.2. 358684us : Unknown type 6
This is because the traceprintk() event (type 6) hasn't been registered yet. That gets done via an earlyinitcall(), which may be early, but not early enough.
Instead of registering the traceprintk() event (and other ftrace events, which are not trace events) via an earlyinitcall(), have them registered at the same time that traceprintk() can be used. This way, if there is a crash before earlyinitcall(), then the trace_printk()s will actually be useful.
[
{
"id": "CVE-2023-53007-0449f63f",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"192496354294791056419644930282231160090",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de3930a4883ddad2244efd6d349013294c62c75c"
},
{
"id": "CVE-2023-53007-06a0b2e7",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f97eb0ab066133483a65c93eb894748de2f6b598"
},
{
"id": "CVE-2023-53007-0e40cce1",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"192496354294791056419644930282231160090",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76b2390fdc80c0a8300e5da5b6b62d201b6fe9ce"
},
{
"id": "CVE-2023-53007-1ae13353",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"192496354294791056419644930282231160090",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f97eb0ab066133483a65c93eb894748de2f6b598"
},
{
"id": "CVE-2023-53007-1e6e0b6f",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"176834572324345713742351249845824606017",
"239893126769863205446820109549993489306",
"37863176856229183689323471446414574470",
"28230284302396301300616888106768483577"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b94d7c7654356860dd7719120c7d15ba38b6162a"
},
{
"id": "CVE-2023-53007-1ecf1648",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0af180514edea6c83dc9a299d9f383009c99f25"
},
{
"id": "CVE-2023-53007-2ae01468",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"91455385251920607317405117317722881517",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0af180514edea6c83dc9a299d9f383009c99f25"
},
{
"id": "CVE-2023-53007-2b265c5e",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"176834572324345713742351249845824606017",
"239893126769863205446820109549993489306",
"37863176856229183689323471446414574470",
"28230284302396301300616888106768483577"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76b2390fdc80c0a8300e5da5b6b62d201b6fe9ce"
},
{
"id": "CVE-2023-53007-3cc7937e",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"176834572324345713742351249845824606017",
"239893126769863205446820109549993489306",
"37863176856229183689323471446414574470",
"180893843334271638562782966071917248126"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@198c83963f6335ca6d690cff067679560f2a3a22"
},
{
"id": "CVE-2023-53007-54cabb3c",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 317.0,
"function_hash": "34728844161045467631746206534725286859"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de3930a4883ddad2244efd6d349013294c62c75c"
},
{
"id": "CVE-2023-53007-63143b47",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 239.0,
"function_hash": "71649883631002096496770596930431365581"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@198c83963f6335ca6d690cff067679560f2a3a22"
},
{
"id": "CVE-2023-53007-6514c942",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 278.0,
"function_hash": "323728530585703860913187396616691209357"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0af180514edea6c83dc9a299d9f383009c99f25"
},
{
"id": "CVE-2023-53007-73010da4",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b94d7c7654356860dd7719120c7d15ba38b6162a"
},
{
"id": "CVE-2023-53007-7376e115",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 277.0,
"function_hash": "244469249351558133312359632360588575480"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b94d7c7654356860dd7719120c7d15ba38b6162a"
},
{
"id": "CVE-2023-53007-75fed9a2",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76b2390fdc80c0a8300e5da5b6b62d201b6fe9ce"
},
{
"id": "CVE-2023-53007-76d52e4a",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"176834572324345713742351249845824606017",
"239893126769863205446820109549993489306",
"37863176856229183689323471446414574470",
"180893843334271638562782966071917248126"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0af180514edea6c83dc9a299d9f383009c99f25"
},
{
"id": "CVE-2023-53007-79a42193",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"176834572324345713742351249845824606017",
"239893126769863205446820109549993489306",
"37863176856229183689323471446414574470",
"180893843334271638562782966071917248126"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bb06eb6e9acf7c4a3e1b5bc87aed398ff8e2253"
},
{
"id": "CVE-2023-53007-86a820de",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"91455385251920607317405117317722881517",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bb06eb6e9acf7c4a3e1b5bc87aed398ff8e2253"
},
{
"id": "CVE-2023-53007-8a900fd2",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 278.0,
"function_hash": "323728530585703860913187396616691209357"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de3930a4883ddad2244efd6d349013294c62c75c"
},
{
"id": "CVE-2023-53007-93858015",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"91455385251920607317405117317722881517",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@198c83963f6335ca6d690cff067679560f2a3a22"
},
{
"id": "CVE-2023-53007-9b810af4",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 317.0,
"function_hash": "34728844161045467631746206534725286859"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0af180514edea6c83dc9a299d9f383009c99f25"
},
{
"id": "CVE-2023-53007-b08640ef",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 278.0,
"function_hash": "323728530585703860913187396616691209357"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b94d7c7654356860dd7719120c7d15ba38b6162a"
},
{
"id": "CVE-2023-53007-b6925015",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@198c83963f6335ca6d690cff067679560f2a3a22"
},
{
"id": "CVE-2023-53007-b7c690b9",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"23217612002426362525438206694970812293",
"214281139260520658858915449061706603948",
"263326646016827894623077263615112307425"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f97eb0ab066133483a65c93eb894748de2f6b598"
},
{
"id": "CVE-2023-53007-b847032b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de3930a4883ddad2244efd6d349013294c62c75c"
},
{
"id": "CVE-2023-53007-be8f9874",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 278.0,
"function_hash": "323728530585703860913187396616691209357"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f97eb0ab066133483a65c93eb894748de2f6b598"
},
{
"id": "CVE-2023-53007-c4e13957",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"135042877006860280635305968939323921554",
"71709553420137857086996503155971729875",
"261450553239662961454238564958423008893",
"247936658849816918295459401382847975040"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bb06eb6e9acf7c4a3e1b5bc87aed398ff8e2253"
},
{
"id": "CVE-2023-53007-cc1a9750",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 317.0,
"function_hash": "34728844161045467631746206534725286859"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@198c83963f6335ca6d690cff067679560f2a3a22"
},
{
"id": "CVE-2023-53007-d1ec1162",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 277.0,
"function_hash": "244469249351558133312359632360588575480"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f97eb0ab066133483a65c93eb894748de2f6b598"
},
{
"id": "CVE-2023-53007-d2d50705",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 317.0,
"function_hash": "34728844161045467631746206534725286859"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bb06eb6e9acf7c4a3e1b5bc87aed398ff8e2253"
},
{
"id": "CVE-2023-53007-d3b1ed62",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 277.0,
"function_hash": "244469249351558133312359632360588575480"
},
"target": {
"function": "early_trace_init",
"file": "kernel/trace/trace.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76b2390fdc80c0a8300e5da5b6b62d201b6fe9ce"
},
{
"id": "CVE-2023-53007-e15b87ef",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 278.0,
"function_hash": "323728530585703860913187396616691209357"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@76b2390fdc80c0a8300e5da5b6b62d201b6fe9ce"
},
{
"id": "CVE-2023-53007-e36b8322",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 239.0,
"function_hash": "71649883631002096496770596930431365581"
},
"target": {
"function": "init_events",
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3bb06eb6e9acf7c4a3e1b5bc87aed398ff8e2253"
},
{
"id": "CVE-2023-53007-e8ab709f",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"192496354294791056419644930282231160090",
"280097561906780030457408644371794745548",
"216800401610376432565965900592700710099",
"281204107273489664710004685357586416930",
"87569037461831517473756351692805004935"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace_output.c"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b94d7c7654356860dd7719120c7d15ba38b6162a"
},
{
"id": "CVE-2023-53007-f4ba2415",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"176834572324345713742351249845824606017",
"239893126769863205446820109549993489306",
"37863176856229183689323471446414574470",
"180893843334271638562782966071917248126"
],
"threshold": 0.9
},
"target": {
"file": "kernel/trace/trace.h"
},
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@de3930a4883ddad2244efd6d349013294c62c75c"
}
]