In the Linux kernel, the following vulnerability has been resolved:
virtionet: fix xdprxq_info bug after suspend/resume
The following sequence currently causes a driver bug warning when using virtio_net:
# ip link set eth0 up # echo mem > /sys/power/state (or e.g. # rtcwake -s 10 -m mem) <resume> # ip link set eth0 down
Missing register, driver bug WARNING: CPU: 0 PID: 375 at net/core/xdp.c:138 xdprxqinfounreg+0x58/0x60 Call trace: xdprxqinfounreg+0x58/0x60 virtnetclose+0x58/0xac _devclosemany+0xac/0x140 _devchangeflags+0xd8/0x210 devchangeflags+0x24/0x64 dosetlink+0x230/0xdd0 ...
This happens because virtnetfreeze() frees the receivequeue completely (including struct xdprxqinfo) but does not call xdprxqinfounreg(). Similarly, virtnetrestore() sets up the receivequeue again but does not call xdprxqinforeg().
Actually, parts of virtnetfreezedown() and virtnetrestoreup() are almost identical to virtnetclose() and virtnetopen(): only the calls to xdprxqinfo(un)reg() are missing. This means that we can fix this easily and avoid such problems in the future by just calling virtnetclose()/open() from the freeze/restore handlers.
Aside from adding the missing xdprxqinfo calls the only difference is that the refill work is only cancelled if netif_running(). However, this should not make any functional difference since the refill work should only be active if the network interface is actually up.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@340fbdc8011f2dc678f622c5ce1cbb5ab8305de7",
"id": "CVE-2022-49687-10655f69",
"deprecated": false,
"target": {
"function": "virtnet_freeze_down",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 409.0,
"function_hash": "139393928495164859211828290804366252099"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57ee40f1b198b59d43c216fbc4672f9300d3c8b0",
"id": "CVE-2022-49687-130c72ec",
"deprecated": false,
"target": {
"function": "virtnet_freeze_down",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 409.0,
"function_hash": "139393928495164859211828290804366252099"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57ee40f1b198b59d43c216fbc4672f9300d3c8b0",
"id": "CVE-2022-49687-2b582c05",
"deprecated": false,
"target": {
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144831564277784423479316983335448727787",
"27653383731181511332701128170718645596",
"231924724701492944089974485718944184961",
"254677695105385908140722217826428927664",
"176017393218564513732222656231766931326",
"248570326959971867054136118848893533133",
"18425675233499282423604410302091230914",
"139514673888521186703642751198667314550",
"285467834485092485106730588163644308619",
"143954908062834161881992657177736790193",
"145548512721897827119362858869894444750",
"282092023185457707123117988125158120240",
"314158027193274769721733283900557923972",
"147209707963130286028622626791493048337",
"77560535215705371388703398979947858617",
"31597724597826875614211014288784258498",
"328916402898808948328113228269964824438",
"312237890531204129850169734290209771930",
"261174752696035717965370623645958200130",
"145113474251786847976923377558190805469",
"115580863157815672616895085096695569623",
"22913494683438326397492060716113763593",
"237294971631296049151109635591004858240",
"37950941221668469063978003775959003921",
"141678751149624762748997516196505957010",
"178984783819117232571407961271584423171",
"319185441638954881921501895161133848485",
"221424001740517457942936352742691020519",
"304191871773989792793813956369760889200"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8af52fe9fd3bf5e7478da99193c0632276e1dfce",
"id": "CVE-2022-49687-30810418",
"deprecated": false,
"target": {
"function": "virtnet_restore_up",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 640.0,
"function_hash": "162212531291532955550842192878990255620"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8d7fe9ad6fddc2af8bde4b921b4f8fab231ed38c",
"id": "CVE-2022-49687-34cf055f",
"deprecated": false,
"target": {
"function": "virtnet_restore_up",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 640.0,
"function_hash": "162212531291532955550842192878990255620"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8d7fe9ad6fddc2af8bde4b921b4f8fab231ed38c",
"id": "CVE-2022-49687-3edde9b6",
"deprecated": false,
"target": {
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144831564277784423479316983335448727787",
"27653383731181511332701128170718645596",
"231924724701492944089974485718944184961",
"254677695105385908140722217826428927664",
"176017393218564513732222656231766931326",
"248570326959971867054136118848893533133",
"18425675233499282423604410302091230914",
"139514673888521186703642751198667314550",
"285467834485092485106730588163644308619",
"143954908062834161881992657177736790193",
"145548512721897827119362858869894444750",
"282092023185457707123117988125158120240",
"314158027193274769721733283900557923972",
"147209707963130286028622626791493048337",
"77560535215705371388703398979947858617",
"31597724597826875614211014288784258498",
"328916402898808948328113228269964824438",
"312237890531204129850169734290209771930",
"261174752696035717965370623645958200130",
"145113474251786847976923377558190805469",
"115580863157815672616895085096695569623",
"22913494683438326397492060716113763593",
"237294971631296049151109635591004858240",
"37950941221668469063978003775959003921",
"141678751149624762748997516196505957010",
"178984783819117232571407961271584423171",
"319185441638954881921501895161133848485",
"221424001740517457942936352742691020519",
"304191871773989792793813956369760889200"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c7a32b7c15555beddc5810c3334d9cefff061bf",
"id": "CVE-2022-49687-59078500",
"deprecated": false,
"target": {
"function": "virtnet_freeze_down",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 409.0,
"function_hash": "139393928495164859211828290804366252099"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9222672fa6370f0ec3d899662cb8680e9282fc4c",
"id": "CVE-2022-49687-74f921da",
"deprecated": false,
"target": {
"function": "virtnet_restore_up",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 640.0,
"function_hash": "162212531291532955550842192878990255620"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@340fbdc8011f2dc678f622c5ce1cbb5ab8305de7",
"id": "CVE-2022-49687-7695d6af",
"deprecated": false,
"target": {
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144831564277784423479316983335448727787",
"27653383731181511332701128170718645596",
"231924724701492944089974485718944184961",
"254677695105385908140722217826428927664",
"176017393218564513732222656231766931326",
"248570326959971867054136118848893533133",
"18425675233499282423604410302091230914",
"139514673888521186703642751198667314550",
"285467834485092485106730588163644308619",
"143954908062834161881992657177736790193",
"145548512721897827119362858869894444750",
"282092023185457707123117988125158120240",
"314158027193274769721733283900557923972",
"147209707963130286028622626791493048337",
"77560535215705371388703398979947858617",
"31597724597826875614211014288784258498",
"328916402898808948328113228269964824438",
"312237890531204129850169734290209771930",
"261174752696035717965370623645958200130",
"145113474251786847976923377558190805469",
"115580863157815672616895085096695569623",
"22913494683438326397492060716113763593",
"237294971631296049151109635591004858240",
"37950941221668469063978003775959003921",
"141678751149624762748997516196505957010",
"178984783819117232571407961271584423171",
"319185441638954881921501895161133848485",
"221424001740517457942936352742691020519",
"304191871773989792793813956369760889200"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8af52fe9fd3bf5e7478da99193c0632276e1dfce",
"id": "CVE-2022-49687-76d4ec70",
"deprecated": false,
"target": {
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144831564277784423479316983335448727787",
"27653383731181511332701128170718645596",
"231924724701492944089974485718944184961",
"254677695105385908140722217826428927664",
"176017393218564513732222656231766931326",
"248570326959971867054136118848893533133",
"18425675233499282423604410302091230914",
"139514673888521186703642751198667314550",
"285467834485092485106730588163644308619",
"143954908062834161881992657177736790193",
"145548512721897827119362858869894444750",
"282092023185457707123117988125158120240",
"314158027193274769721733283900557923972",
"147209707963130286028622626791493048337",
"77560535215705371388703398979947858617",
"31597724597826875614211014288784258498",
"328916402898808948328113228269964824438",
"312237890531204129850169734290209771930",
"261174752696035717965370623645958200130",
"145113474251786847976923377558190805469",
"115580863157815672616895085096695569623",
"22913494683438326397492060716113763593",
"237294971631296049151109635591004858240",
"37950941221668469063978003775959003921",
"141678751149624762748997516196505957010",
"178984783819117232571407961271584423171",
"319185441638954881921501895161133848485",
"221424001740517457942936352742691020519",
"304191871773989792793813956369760889200"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9222672fa6370f0ec3d899662cb8680e9282fc4c",
"id": "CVE-2022-49687-835ee61d",
"deprecated": false,
"target": {
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144831564277784423479316983335448727787",
"27653383731181511332701128170718645596",
"231924724701492944089974485718944184961",
"254677695105385908140722217826428927664",
"176017393218564513732222656231766931326",
"248570326959971867054136118848893533133",
"18425675233499282423604410302091230914",
"139514673888521186703642751198667314550",
"285467834485092485106730588163644308619",
"143954908062834161881992657177736790193",
"145548512721897827119362858869894444750",
"282092023185457707123117988125158120240",
"314158027193274769721733283900557923972",
"147209707963130286028622626791493048337",
"77560535215705371388703398979947858617",
"31597724597826875614211014288784258498",
"328916402898808948328113228269964824438",
"312237890531204129850169734290209771930",
"261174752696035717965370623645958200130",
"145113474251786847976923377558190805469",
"115580863157815672616895085096695569623",
"22913494683438326397492060716113763593",
"237294971631296049151109635591004858240",
"37950941221668469063978003775959003921",
"141678751149624762748997516196505957010",
"178984783819117232571407961271584423171",
"319185441638954881921501895161133848485",
"221424001740517457942936352742691020519",
"304191871773989792793813956369760889200"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8af52fe9fd3bf5e7478da99193c0632276e1dfce",
"id": "CVE-2022-49687-a8476428",
"deprecated": false,
"target": {
"function": "virtnet_freeze_down",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 409.0,
"function_hash": "139393928495164859211828290804366252099"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@340fbdc8011f2dc678f622c5ce1cbb5ab8305de7",
"id": "CVE-2022-49687-cdc1887e",
"deprecated": false,
"target": {
"function": "virtnet_restore_up",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 640.0,
"function_hash": "162212531291532955550842192878990255620"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9222672fa6370f0ec3d899662cb8680e9282fc4c",
"id": "CVE-2022-49687-d5ab7173",
"deprecated": false,
"target": {
"function": "virtnet_freeze_down",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 409.0,
"function_hash": "139393928495164859211828290804366252099"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c7a32b7c15555beddc5810c3334d9cefff061bf",
"id": "CVE-2022-49687-e662530b",
"deprecated": false,
"target": {
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"144831564277784423479316983335448727787",
"27653383731181511332701128170718645596",
"231924724701492944089974485718944184961",
"254677695105385908140722217826428927664",
"176017393218564513732222656231766931326",
"248570326959971867054136118848893533133",
"18425675233499282423604410302091230914",
"139514673888521186703642751198667314550",
"285467834485092485106730588163644308619",
"143954908062834161881992657177736790193",
"145548512721897827119362858869894444750",
"282092023185457707123117988125158120240",
"314158027193274769721733283900557923972",
"147209707963130286028622626791493048337",
"77560535215705371388703398979947858617",
"31597724597826875614211014288784258498",
"328916402898808948328113228269964824438",
"312237890531204129850169734290209771930",
"261174752696035717965370623645958200130",
"145113474251786847976923377558190805469",
"115580863157815672616895085096695569623",
"22913494683438326397492060716113763593",
"237294971631296049151109635591004858240",
"37950941221668469063978003775959003921",
"141678751149624762748997516196505957010",
"178984783819117232571407961271584423171",
"319185441638954881921501895161133848485",
"221424001740517457942936352742691020519",
"304191871773989792793813956369760889200"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@57ee40f1b198b59d43c216fbc4672f9300d3c8b0",
"id": "CVE-2022-49687-f1cb4975",
"deprecated": false,
"target": {
"function": "virtnet_restore_up",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 640.0,
"function_hash": "162212531291532955550842192878990255620"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8d7fe9ad6fddc2af8bde4b921b4f8fab231ed38c",
"id": "CVE-2022-49687-fbd1e2e9",
"deprecated": false,
"target": {
"function": "virtnet_freeze_down",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 409.0,
"function_hash": "139393928495164859211828290804366252099"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c7a32b7c15555beddc5810c3334d9cefff061bf",
"id": "CVE-2022-49687-fe6f002e",
"deprecated": false,
"target": {
"function": "virtnet_restore_up",
"file": "drivers/net/virtio_net.c"
},
"signature_version": "v1",
"digest": {
"length": 640.0,
"function_hash": "162212531291532955550842192878990255620"
},
"signature_type": "Function"
}
]