orangefs: fix double-free of trailer_buf on readdir copy failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 382f4581e67f57209c7aa67e39f26ba076306a2e · < f796f38a324e89547738f4b70cc33be5be2bc6da| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
orangefs: fix double-free of trailer_buf on readdir copy failure
On a readdir downcall, orangefs_devreq_write_iter() frees op->downcall.trailer_buf with vfree() when copy_from_iter_full() fails, but does not clear the pointer before goto Efault. The waiter in do_readdir() is then woken with a negative status and frees the same pointer again on its r < 0 path, causing a deterministic double-free. A client holding /dev/pvfs2-req triggers it by sending a readdir downcall whose declared trailer_size exceeds the bytes it supplies.
Clear the pointer after freeing so the readdir-side vfree() becomes a no-op.
From the CVE record · Linux
The Linux kernel's OrangeFS readdir path can free the same buffer twice when copying a downcall trailer fails. A client holding /dev/pvfs2-req can trigger this by declaring a trailer size larger than the bytes it supplies. No user interaction is described.
Engineers running the Linux kernel with OrangeFS should check their installations; affected versions were not provided.