This seems concerning: "Deserialization of untrus...
# random
c
This seems concerning: "Deserialization of untrusted data can occur in the R statistical programming language, on any version starting at 1.4.0 up to and not including 4.4.0, enabling a maliciously crafted RDS (R Data Serialization) formatted file or R package to run arbitrary code on an end user’s system when interacted with." https://nvd.nist.gov/vuln/detail/CVE-2024-27322
t
It is certainly not good. But whenever you load and run an R package, you are running someone else's code, so there is risk, because few of us read and understand the source code before use (and even fewer ascertain that this source code was actually used to compile the binaries we run). This exploit would likely also fool the people who read the source code, so it sucks for them, but for the rest of us little has changed. If you get your libraries (and any test data) from CRAN and Bioconductor, you are probably safe, as the source code has been reviewed and the binaries get built using trusted processes. And if you download code from some random person's website, you have to decide how far you trust them. Even if their intentions are good, shoddy programming could potentially do some damage. If an exploit could affect video or image data, which people download all the time from the web (from cute cat pictures to naked aliens and what not), it would very worrisome (and could easily turn half of the worlds home computers into bots), but I think the market for RDS objects is too small and fragmented to make it worth the effort for anyone to craft such an object. That said, if you are working on a top-secret industry or government project valuable enough to attract international superspies, maybe write your own code and data.
c
yeah -- i had the exact same reaction. But, I think what it is saying is that the promise function itself in the R package wouldn't contain the malicious or 'arbitrary' code. The package would contain a promise function that would run code in some unbound variable. Then, in an RDS package, the unbound variable could be set to that arbitrary/malicious code, and whenever the promise function was accessed, that code would run. I'm not sure that is quite right, but it seems to be the gist. In any case, the source code/package (hypothetically on CRAN or bioconductor) wouldn't necessarily have the malicious code, is the point i take away from it.
👍 1
t
Yes, you can have the malicious code either in an RDS data file or in a manipulated package (which basically stores its data that format). Either has to be downloaded from some untrusted source, so if you avoid that, you are safe.
c
unless it is included in the CRAN package as part of the
data
-- source code for the RDS file wouldn't necessarily be read/checked in the review.
👍 1