Commit c0cd6e3
committed
fix: kext: sysfs_vnops: fail unimplemented vnops instead of faking success
sysfs_vnop_default() returned 0 - "handled, successfully" - for every vnode
operation this filesystem does not implement. The caller then read back output
parameters we never wrote: getxattr and listxattr appeared to succeed with an
uninitialised result length, pathconf yielded an uninitialised limit, and pagein
claimed to have filled a page it never faulted in.
Finder, the Dock, LaunchServices and the pasteboard query exactly those on paths
they enumerate, so the damage presented as a system fault rather than a
filesystem one: apps progressively failing to launch, copy/paste hanging, the
Dock going unresponsive, recoverable only by rebooting. Crucially the volume
needed is tiny - a handful of poisoned replies is enough to wedge a process
permanently - which is why the filesystem looked idle throughout (one live vnode,
one snapshot build) while the machine degraded.
Return ENOTSUP, which is what VFS expects from an unsupported optional operation
and which it handles gracefully everywhere. Implement vnop_pathconf properly as
well, since callers size buffers and bound loops from its result.1 parent d157e6a commit c0cd6e3
1 file changed
Lines changed: 54 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
213 | 231 | | |
214 | 232 | | |
215 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
216 | 270 | | |
217 | 271 | | |
218 | 272 | | |
| |||
0 commit comments