-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Description
I've noticed that fs_getfilep() returns the pointer from list->fl_files. The returned pointer is used further and passed to other APIs. The list->fl_files access is protected by list->fl_lock, but after fs_getfilep() returns the list->fl_lock is released. On the other hand the files_extend() contains tmp = kmm_realloc(list->fl_files, sizeof(FAR struct file *) * row); call that potentially can move all the list entries to a new memory location. So it one thread is interrupted after fs_getfilep() returns and another thread leads to files_extend() call the first thread will potentially access already freed memory (maybe even allocated and used by another user), so potentially can cause memory corruption.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels