Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
1udfx9cf8azi0
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
1udfx9cf8azi0
3y ago
> No, because if nbytes > sizeof(*hwrpb), your version causes the kernel to only write part of the buffer, and then when the app accesses fields at the end of the struct, it would read uninitialized data, which is very bad. > I wou
2.
▲
by
1udfx9cf8azi0
3y ago
> The original less-than check was deemed incorrect It was only deemed incorrect because of an information leak. Not because it's a valid use-case for user space to copy smaller portions of *hwrpb into user space. https://
3.
▲
by
1udfx9cf8azi0
3y ago
That's what the original check is for: if (nbytes < sizeof(*hwrpb)) If the buffer isn't large enough to hold *hwrpb, then it already fails. The original check was good, only needed to change the amount of bytes copied
4.
▲
by
1udfx9cf8azi0
3y ago
if (nbytes < sizeof(*hwrpb)) return -1; if (copy_to_user(buffer, hwrpb, nbytes) != 0) return -2; The fix that was done was: if (nbytes > sizeof(*hwrpb)) But I think the correct fix is:
5.
▲
by
1udfx9cf8azi0
3y ago
Hacker News is not the best crowd for something like this. Everyone here most likely already has their own optimized workflow for something like this, including me. This is probably best suited for digital creative types who use Windows and
6.
▲
by
1udfx9cf8azi0
3y ago
The study did not show that Ivermectin killed SARS-CoV-2 viral particles. Prior to the pandemic, Ivermectin was known to act as an broad anti-viral. This is due to Ivermectin being a protease inhibitor, i.e. it blocks an enzyme from acting.