mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
Kernel: Don't leak kmalloc pointers through FIFO absolute paths
Instead of using the FIFO's memory address as part of its absolute path identity, just use an incrementing FIFO index instead. Note that this is not used for anything other than debugging (it helps you identify which file descriptors refer to the same FIFO by looking at /proc/PID/fds
This commit is contained in:
parent
5646a95161
commit
56a2c21e0c
2 changed files with 5 additions and 11 deletions
|
@ -14,8 +14,6 @@ public:
|
|||
Writer
|
||||
};
|
||||
|
||||
static RefPtr<FIFO> from_fifo_id(u32);
|
||||
|
||||
static NonnullRefPtr<FIFO> create(uid_t);
|
||||
virtual ~FIFO() override;
|
||||
|
||||
|
@ -43,4 +41,6 @@ private:
|
|||
DoubleBuffer m_buffer;
|
||||
|
||||
uid_t m_uid { 0 };
|
||||
|
||||
int m_fifo_id { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue