The st variable is used as a shortcut for &node->inode->st, but in one
branch just before the exit we update node->inode without changing st.
Not sure which of the two approaches is preferable
Reported by: AddressSanitizer
Differential D28570
usr.sbin/makefs: fix use-after-free in read_mtree_keywords() arichardson on Feb 10 2021, 12:07 PM. Authored by Tags None Referenced Files
Subscribers
Details The st variable is used as a shortcut for &node->inode->st, but in one Not sure which of the two approaches is preferable Reported by: AddressSanitizer ASan no longer complains.
Diff Detail
Event Timeline
Comment Actions LGTM. I'd probably not use "avoid UAF" in the comment though, we are resetting st because it has been invalidated by freeing node->inode |