In the Linux kernel, the following vulnerability has been resolved:
x86/fpu: Stop relying on userspace for info to fault in xsave buffer
Before this change, the expected size of the user space buffer was taken from fxsw->xstatesize. fxsw->xstatesize can be changed from user-space, so it is possible construct a sigreturn frame where:
In this case, xrstor tries to restore and accesses the unmapped area which results in a fault. But faultinreadable succeeds because buf + fxsw->xstatesize is within the still mapped area, so it goes back and tries xrstor again. It will spin in this loop forever.
Instead, fault in the maximum size which can be touched by XRSTOR (taken from fpstate->user_size).
[ dhansen: tweak subject / changelog ]
{ "vanir_signatures": [ { "id": "CVE-2024-26603-18daab4c", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "restore_fpregs_from_user" }, "signature_version": "v1", "digest": { "length": 638.0, "function_hash": "228769266495853707979784408098350895719" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@627339cccdc9166792ecf96bc3c9f711a60ce996" }, { "id": "CVE-2024-26603-37e34af8", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "__fpu_restore_sig" }, "signature_version": "v1", "digest": { "length": 1577.0, "function_hash": "195216435798046758879421232999025169649" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@627339cccdc9166792ecf96bc3c9f711a60ce996" }, { "id": "CVE-2024-26603-3e937533", "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/signal.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "50095219480710148596467898245746225076", "312221821753908310453040311138026044834", "22803329204584428243688107855879372729", "140605639932927759105433267889962301432", "276294232291311712573542499709538071985", "218929868770156484052931879028581032018", "39990079093946863694002198592329674733", "94609877217631766487830137775163137176", "23638881076352308681062103906363511595", "98399499863010719413743955129006857420", "128806491415608046972552200850379217690", "120455769304651112072758401983602611439", "338223270268868669090943062692563344418", "136194105398206221191631690395863895920", "235458741454188766050148862579860054703", "175149483740567474665715314717444205896", "243413647509458914992252568086290932382", "337578985402891148977899607443394150128", "73965007582528958063452637146736920181", "108233218363698147943417886469543805309", "16603623914727190510820108424290033678", "212639828673925920201758825757625483833", "272242446221484348864029918213124745567", "8456441937161865635450439790809687676", "13370743814255625461264833775622963396", "317907531211624855409054385024605640310", "314079944089499966378542121430465161487", "52308165893612344540147432203702496663" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2479ab426cef7ab79a13005650eff956223ced2" }, { "id": "CVE-2024-26603-503f1260", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "__fpu_restore_sig" }, "signature_version": "v1", "digest": { "length": 1577.0, "function_hash": "195216435798046758879421232999025169649" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d877550eaf2dc9090d782864c96939397a3c6835" }, { "id": "CVE-2024-26603-6262a9bb", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "__fpu_restore_sig" }, "signature_version": "v1", "digest": { "length": 1630.0, "function_hash": "145755578018706985948681558886245175858" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8bd3eee7720c14b59a206bd05b98d7586bccf99a" }, { "id": "CVE-2024-26603-6702be79", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "__fpu_restore_sig" }, "signature_version": "v1", "digest": { "length": 1577.0, "function_hash": "195216435798046758879421232999025169649" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2479ab426cef7ab79a13005650eff956223ced2" }, { "id": "CVE-2024-26603-79a00ec0", "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/signal.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "50095219480710148596467898245746225076", "312221821753908310453040311138026044834", "22803329204584428243688107855879372729", "140605639932927759105433267889962301432", "276294232291311712573542499709538071985", "218929868770156484052931879028581032018", "39990079093946863694002198592329674733", "94609877217631766487830137775163137176", "23638881076352308681062103906363511595", "98399499863010719413743955129006857420", "128806491415608046972552200850379217690", "120455769304651112072758401983602611439", "338223270268868669090943062692563344418", "136194105398206221191631690395863895920", "235458741454188766050148862579860054703", "175149483740567474665715314717444205896", "243413647509458914992252568086290932382", "337578985402891148977899607443394150128", "73965007582528958063452637146736920181", "108233218363698147943417886469543805309", "16603623914727190510820108424290033678", "212639828673925920201758825757625483833", "272242446221484348864029918213124745567", "8456441937161865635450439790809687676", "13370743814255625461264833775622963396", "317907531211624855409054385024605640310", "314079944089499966378542121430465161487", "52308165893612344540147432203702496663" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@627339cccdc9166792ecf96bc3c9f711a60ce996" }, { "id": "CVE-2024-26603-84953dd3", "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/signal.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "189069926663730752900497740285148361073", "206983887402099048545829755898368162324", "218127428178095432577524804882253336487", "315125794058847968921331113575321731206", "276294232291311712573542499709538071985", "218929868770156484052931879028581032018", "39990079093946863694002198592329674733", "242533637785920290611927960367601106973", "293485260903823407620580188196311255520", "42094740889287078904661097515022883425", "297649870830020334822065689541870128872", "102731935022192433291690591631364467020", "237823240940505818673364280969671573039", "247493621001782664886788836855403876392", "307487987998708767079219157736765573550", "91856896495031675761729539985714505647", "31598920830244241537686665129166101550", "17224658718341683240714890663814130528", "73965007582528958063452637146736920181", "108233218363698147943417886469543805309", "178428513743841977017389964552177709867", "13370743814255625461264833775622963396", "317907531211624855409054385024605640310", "148405809173975375930244373202196489595", "235707778411706167096152563845252022512" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8bd3eee7720c14b59a206bd05b98d7586bccf99a" }, { "id": "CVE-2024-26603-af54c345", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "restore_fpregs_from_user" }, "signature_version": "v1", "digest": { "length": 596.0, "function_hash": "276733549095385449320381584874662951515" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8bd3eee7720c14b59a206bd05b98d7586bccf99a" }, { "id": "CVE-2024-26603-c78b4804", "signature_type": "Line", "target": { "file": "arch/x86/kernel/fpu/signal.c" }, "signature_version": "v1", "digest": { "line_hashes": [ "50095219480710148596467898245746225076", "312221821753908310453040311138026044834", "22803329204584428243688107855879372729", "140605639932927759105433267889962301432", "276294232291311712573542499709538071985", "218929868770156484052931879028581032018", "39990079093946863694002198592329674733", "94609877217631766487830137775163137176", "23638881076352308681062103906363511595", "98399499863010719413743955129006857420", "128806491415608046972552200850379217690", "120455769304651112072758401983602611439", "338223270268868669090943062692563344418", "136194105398206221191631690395863895920", "235458741454188766050148862579860054703", "175149483740567474665715314717444205896", "243413647509458914992252568086290932382", "337578985402891148977899607443394150128", "73965007582528958063452637146736920181", "108233218363698147943417886469543805309", "16603623914727190510820108424290033678", "212639828673925920201758825757625483833", "272242446221484348864029918213124745567", "8456441937161865635450439790809687676", "13370743814255625461264833775622963396", "317907531211624855409054385024605640310", "314079944089499966378542121430465161487", "52308165893612344540147432203702496663" ], "threshold": 0.9 }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d877550eaf2dc9090d782864c96939397a3c6835" }, { "id": "CVE-2024-26603-d1df7d9b", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "restore_fpregs_from_user" }, "signature_version": "v1", "digest": { "length": 638.0, "function_hash": "228769266495853707979784408098350895719" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2479ab426cef7ab79a13005650eff956223ced2" }, { "id": "CVE-2024-26603-ed3cc374", "signature_type": "Function", "target": { "file": "arch/x86/kernel/fpu/signal.c", "function": "restore_fpregs_from_user" }, "signature_version": "v1", "digest": { "length": 638.0, "function_hash": "228769266495853707979784408098350895719" }, "deprecated": false, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d877550eaf2dc9090d782864c96939397a3c6835" } ] }