size_t-to-int vulnerability in Linux’s filesystem layer
1–10 of 280 posts
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#2Is this the type of things that could be caught by a linter or strict compilation rules? This seems to be to be a failure of the type system.
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#3> Unfortunately, this size_t is also passed to functions whose size argument is an int (a signed 32-bit integer), not a size_t. Is this the type of things that could be caught by a linter or strict compilation rules? This seems to be to be a failure of the type system.
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#4I'm clueless about security: where does this fall on the scale of non-issue to critical? It strikes me as tending towards the latter, given that it enables unprivileged users to become root. Any insight into past Linux Kernel vulnerabilities that were severe?
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#5> Unfortunately, this size_t is also passed to functions whose size argument is an int (a signed 32-bit integer), not a size_t. Is this the type of things that could be caught by a linter or strict compilation rules? This seems to be to be a failure of the type system.
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#6Re: size_t-to-int vulnerability in Linux’s filesystem layer
#7(Some Rust developers argue that even "size as i32" should be avoided, and "size.try_into()" should be used instead, since it forces the programmer to treat an overflow explicitly at runtime, instead of silently wrapping.)
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#8If there's one place other than the kernel where truly defensive programming should be applied, it is systemd.
Re: size_t-to-int vulnerability in Linux’s filesystem layer
#9Re: size_t-to-int vulnerability in Linux’s filesystem layer
#10Can we not have one integer type in c that can grow like in js as required and become bigint if too big?