Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X 10.15 (Catalina) security issues - bin/R and library(ggplot2) #170

Closed
mik3hall opened this issue Nov 8, 2020 · 3 comments
Closed
Labels

Comments

@mik3hall
Copy link

mik3hall commented Nov 8, 2020

Thank you for reporting a bug in FastR. We will do our best to eventually address all open issues, however, you can also help us and increase the chances of your issue being fixed sooner by following these guidelines:

Can you reproduce with the latest development build?

Haven't tried but reasonably current

Include the following info

  • GraalVM version or git revisions of FastR and GraalVM repositories if built from source.
    • Use $GRAALVM_HOME/bin/R --vm.version and include the full output.

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment GraalVM CE 20.1.0-dev (build 11.0.6+9-jvmci-20.1-b01)
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0-dev (build 11.0.6+9-jvmci-20.1-b01, mixed mode, sharing)

  • Output of R built-in function sessionInfo().

sessionInfo()
FastR version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin19.6.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS: /Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/lib/libRblas.dylib
LAPACK: /Users/mjh/HalfPipe/HalfPipe_jpkg/outFastR/FastRGraalHPS.app/Contents/runtime/Contents/Home/languages/R/lib/libRlapack.dylib

locale:
[1] UTF-8/UTF-8/UTF-8/C/UTF-8/UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

  • OS name and version.
    OS X 10.15 (Catalina)

To run FastR command line bin/R I had to...
sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java...
I believe I saw that documentation is being worked on to indicate that this is needed.

Then I successfully get...

library(ggplot2)
Registered S3 methods overwritten by 'ggplot2':
method from
[.quosures rlang
c.quosures rlang
print.quosures rlang

If I try this on Catalina with my own application I get...

library(ggplot2)
Error in gzfile(file, "rb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "rb") :
cannot open file '/Users/mjh/Documents/R/fastr/ggplot2/Meta/package.rds': /Users/mjh/Documents/R/fastr/ggplot2/Meta/package.rds: Operation not permitted
at gzfile(internal:1:0)
at readRDS(unknown.r:1:0-17)
at (unknown.r:1:0-13)
at lapply(:1:0-15)
at find.package(unknown.r:1-11:0-447)
at library(unknown.r:1:0-62)
at (:1:0-15)
at null(:1:0-15)
at org.graalvm.sdk/org.graalvm.polyglot.Context.eval(Context.java:345)
at us.hall.fastr.SimpleTest.main(SimpleTest.java:48)

As shown packages are installed to my user Documents directory. The application doing gzfile from doesn't appear to have access rights. Giving the application "Full Disk Access" didn't correct this. I couldn't figure out how to specifically give it the Documents directory.
At some point when I went into System Preferences "Security & Privacy" it was showing the application had an error where the application was shown as /Library/Java/JavaVirtualMachines/graalvm-ce-java11-20.1.0-dev. It gave me an option to open that from the preference panel but this of course only opened the jdk directory. I am unable to recreate that at the moment.
This might be why giving my own application "Full Disk Access" doesn't work?
But there appear to be some application use of FastR at the OS X Catalina version security problems.

@mik3hall mik3hall added the bug label Nov 8, 2020
@steve-s
Copy link
Member

steve-s commented Dec 4, 2020

Hello mik3hall,

thank you for the report. So it seems that the installation of ggplot2 is creating the file(s) with wrong permissions? I.e., the file /Users/mjh/Documents/R/fastr/ggplot2/Meta/package.rds does not have the read bit set if you check ls -l /Users/mjh/Documents/R/fastr/ggplot2/Meta/package.rds? The installation process maybe gets this wrong for some reason. Does adding the permission via chmod +r /Users/mjh/Documents/R/fastr/ggplot2/Meta/package.rds fix this?

@mik3hall
Copy link
Author

Hello,
I'm not quite sure what this was about. I can't recreate now. You should be able to close this.

I re-installed ggplot2 and it didn't go entirely smoothly but did work...
R> library(ggplot2)
Error in get(paste0(generic, ".", class), envir = parent.frame()) :
object 'vec_ptype2.glue.glue' not found
R> library(glue)
R> library(ggplot2)
R>
glue was one of the dependencies I had to reinstall due to errors like...
Error: package ‘glue’ was installed before R 4.0.0: please re-install it

@steve-s
Copy link
Member

steve-s commented Jun 14, 2021

Thanks for reporting back!

@steve-s steve-s closed this as completed Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants