Commit Graph

5 Commits

Author SHA1 Message Date
Marek Kraus
02249b86cf
Merge pull request #7 from PaulCapron/patch-1
vfs: Fix counting in `inode_avail_count`
2020-10-28 23:00:59 +01:00
Josef Schlehofer
87970e63c5
Fix buffer overflow in EAP
Fixes CVE-2020-8597
2020-10-28 19:41:15 +01:00
Paul Capron
9d3c1f77da
vfs: Fix counting in inode_avail_count
As seen in `inode_del` (and `inode_alloc`), a free (`NOT_INIT`) node can be found anywhere in `g_vfs_dev_nodes`; it’s a “sparse” list.
So when checking for free nodes, the iterating index variable (`e`) shall be used, not the counter (`count`). The code got that wrong.
For instance, if the first node is not available (type is not `VFS_TYPE_NOT_INIT`), then the function previously returned 0, no matter what, and was iterating the node list in vain.
2020-10-28 11:36:43 +01:00
bouffalolab2020
61d60a3dc0
Delete README.md 2020-10-27 10:34:41 +08:00
Rujun Wang
ee4a10b1a1 Initial Commit 2020-10-26 20:35:25 +08:00