In the Linux kernel, the following vulnerability has been resolved:
mm,hugetlb: take hugetlblock before decrementing h->resvhuge_pages
The h->*hugepages counters are protected by the hugetlblock, but allochuge_page has a corner case where it can decrement the counter outside of the lock.
This could lead to a corrupted value of h->resvhugepages, which we have observed on our systems.
Take the hugetlblock before decrementing h->resvhuge_pages to avoid a potential race.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50285.json",
"cna_assigner": "Linux"
}[
{
"deprecated": false,
"id": "CVE-2022-50285-0482a46f",
"digest": {
"line_hashes": [
"50229043140098527235786936919798833600",
"80867553722925664170809594166767722465",
"323780340650313155503646978773377225536",
"67124735997926843629025702780505539160",
"200927991812917222445190915212775537260",
"48329111436601860342293136900142720716",
"83926561350241616942025968065096464740",
"324567658013217996618259410868626390396",
"258385268543255495720096504634252503825"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e50a07b6a5fcd39df1534d3fdaca4292a65efe6",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-07911264",
"digest": {
"line_hashes": [
"334364556868263635296559234974342860343",
"77829905427770881739516309341669534831",
"223918547369128564768705970467778889349",
"123638925491763599155108897010039620579",
"227107677093268408629021043963862495289",
"304699327834790846789485160633137839359",
"323390288313023846194392566783472347536",
"193263101919323536512496072291536478890",
"161852437620871973886307901964351747027"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12df140f0bdfae5dcfc81800970dd7f6f632e00c",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-0a4db774",
"digest": {
"line_hashes": [
"334364556868263635296559234974342860343",
"77829905427770881739516309341669534831",
"223918547369128564768705970467778889349",
"123638925491763599155108897010039620579",
"227107677093268408629021043963862495289",
"304699327834790846789485160633137839359",
"323390288313023846194392566783472347536",
"131269521655426187504927874694630286017",
"332818503215057459770252861365017365570"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c828fab903725279aa9dc6ae3d44bb7e4778f92c",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-16858e06",
"digest": {
"function_hash": "192067169525835149110894710312085244142",
"length": 1808.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@112a005d1ded04a4b41b6d01833cc0bda90625cc",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-16b8d7ce",
"digest": {
"function_hash": "200373798725892219452733176361160994810",
"length": 1455.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@629c986e19fe9481227c7cdfd9a105bbc104d245",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-272d4aa2",
"digest": {
"function_hash": "200373798725892219452733176361160994810",
"length": 1455.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2b35432d324898ec41beb27031d2a1a864a4d40e",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-2cf69697",
"digest": {
"function_hash": "192067169525835149110894710312085244142",
"length": 1808.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c828fab903725279aa9dc6ae3d44bb7e4778f92c",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-3befe18a",
"digest": {
"line_hashes": [
"277006700648636437051794989058097437502",
"77829905427770881739516309341669534831",
"323780340650313155503646978773377225536",
"67124735997926843629025702780505539160",
"200927991812917222445190915212775537260",
"48329111436601860342293136900142720716",
"127156190636370805383737405936192679963",
"251239429369448971219369223996223602125",
"94983481605454711825961762424282322310"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@568e3812b1778b4c0c229649b59977d88f400ece",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-56564fe0",
"digest": {
"function_hash": "200373798725892219452733176361160994810",
"length": 1455.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e50a07b6a5fcd39df1534d3fdaca4292a65efe6",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-56d49bff",
"digest": {
"function_hash": "155762201108187089806108451234965417492",
"length": 1851.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@568e3812b1778b4c0c229649b59977d88f400ece",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-5c5744ab",
"digest": {
"line_hashes": [
"277006700648636437051794989058097437502",
"77829905427770881739516309341669534831",
"323780340650313155503646978773377225536",
"67124735997926843629025702780505539160",
"200927991812917222445190915212775537260",
"48329111436601860342293136900142720716",
"83926561350241616942025968065096464740",
"324567658013217996618259410868626390396",
"258385268543255495720096504634252503825"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2b35432d324898ec41beb27031d2a1a864a4d40e",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-5e5d9f9c",
"digest": {
"line_hashes": [
"50229043140098527235786936919798833600",
"80867553722925664170809594166767722465",
"323780340650313155503646978773377225536",
"67124735997926843629025702780505539160",
"200927991812917222445190915212775537260",
"48329111436601860342293136900142720716",
"83926561350241616942025968065096464740",
"324567658013217996618259410868626390396",
"258385268543255495720096504634252503825"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@629c986e19fe9481227c7cdfd9a105bbc104d245",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-8a9dd912",
"digest": {
"line_hashes": [
"277006700648636437051794989058097437502",
"77829905427770881739516309341669534831",
"323780340650313155503646978773377225536",
"67124735997926843629025702780505539160",
"200927991812917222445190915212775537260",
"48329111436601860342293136900142720716",
"83926561350241616942025968065096464740",
"324567658013217996618259410868626390396",
"258385268543255495720096504634252503825"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@11993652d0b49e27272db0a37aa828d8a3a4b92b",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-a1936555",
"digest": {
"line_hashes": [
"334364556868263635296559234974342860343",
"77829905427770881739516309341669534831",
"223918547369128564768705970467778889349",
"123638925491763599155108897010039620579",
"227107677093268408629021043963862495289",
"304699327834790846789485160633137839359",
"323390288313023846194392566783472347536",
"131269521655426187504927874694630286017",
"332818503215057459770252861365017365570"
],
"threshold": 0.9
},
"signature_version": "v1",
"target": {
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@112a005d1ded04a4b41b6d01833cc0bda90625cc",
"signature_type": "Line"
},
{
"deprecated": false,
"id": "CVE-2022-50285-ea0df441",
"digest": {
"function_hash": "200373798725892219452733176361160994810",
"length": 1455.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@11993652d0b49e27272db0a37aa828d8a3a4b92b",
"signature_type": "Function"
},
{
"deprecated": false,
"id": "CVE-2022-50285-f41f6843",
"digest": {
"function_hash": "17932726734779428466112884219550527119",
"length": 1827.0
},
"signature_version": "v1",
"target": {
"function": "alloc_huge_page",
"file": "mm/hugetlb.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12df140f0bdfae5dcfc81800970dd7f6f632e00c",
"signature_type": "Function"
}
]
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50285.json"