eneshecan / whatsapp-for-linux

An unofficial WhatsApp desktop application for Linux.
GNU General Public License v3.0
1.01k stars 105 forks source link

AppArmor permission denied #131

Open teone opened 3 years ago

teone commented 3 years ago

First of all thanks for making this available!

Description I installed whatsapp-for-linux via snap with:

sudo snap install whatsapp-for-linux

While checking in /var/log/syslog for other thing I noticed this repeated log:

Aug 10 07:46:28 tedx kernel: [345711.057769] audit: type=1400 audit(1628606788.945:8308): apparmor="DENIED" operation="open" profile="snap.whatsapp-for-linux.whatsapp-for-linux" name="/proc/zoneinfo" pid=1316568 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=1001 ouid=0
Aug 10 07:46:33 tedx kernel: [345716.058809] audit: type=1400 audit(1628606793.945:8309): apparmor="DENIED" operation="open" profile="snap.whatsapp-for-linux.whatsapp-for-linux" name="/proc/zoneinfo" pid=1316568 comm="PressureMonitor" requested_mask="r" denied_mask="r" fsuid=1001 ouid=0

any idea what is causing that?

Thanks in advance

ISQman commented 3 years ago

For me solved by creating a new apparmor profile:

cat /etc/apparmor.d/snap.bin.whatsapp-for-linux

profile snap.whatsapp-for-linux.whatsapp-for-linux /snap/{,whatsapp-for-linux//}bin/whatsapp-for-linux flags=(complain) { /proc/zoneinfo r, /proc//smaps r, network inet stream, network inet6 stream, }

and after reload apparmor:

service apparmor reload

teone commented 3 years ago

@ISQman thanks, once created the apparmor profile I get:

Sep  2 11:24:35 tedx kernel: [94970.373544] audit: type=1400 audit(1630607075.871:7394): apparmor="ALLOWED" operation="open" profile="snap.whatsapp-for-linux.whatsapp-for-linux" name="/proc/62486/smaps" pid=62486 comm="WebKitWebProces" requested_mask="r" denied_mask="r" fsuid=1001 ouid=1001

every 30 seconds, I guess it's normal to have that log?

pmensik commented 2 years ago

Is there any update to this issue? I am encountering the same thing as @teone

bboozzoo commented 2 years ago

Has anyone asked the question why the app tries to read /proc/zoneinfo in the first place?

teone commented 2 years ago

Is there any update to this issue? I am encountering the same thing as @teone

@pmensik I have never followed up as apart the log message I had not seen any side effect in the functionalities. And now I don't even have a linux machine anymore :(

cabezayunke commented 1 year ago

same issue here on Ubuntu 22 and installed from snap. I am uninstalling until this is resolved, I cannot have an app filling up my disk with log messages.... I am also interested in @bboozzoo question... why does it need access to /proc/zoneinfo

connortechnology commented 1 year ago

The profile above didn't work for me. Here is mine. Please be aware that it is likely very insecure due to the * in smaps

profile snap.whatsapp-for-linux.whatsapp-for-linux /snap/bin/whatsapp-for-linux flags=(complain) { /proc/zoneinfo r, /proc/*/smaps r, network inet stream, network inet6 stream, }

ISQman commented 1 year ago

Thank you for your answer. This issue is not acrual for now because I don't use Linux more than year, so I even cant check and make changes.

вт, 10 січ. 2023, 23:13 користувач Isaac Connor @.***> пише:

The profile above didn't work for me. Here is mine. Please be aware that it is likely very insecure due to the * in smaps

profile snap.whatsapp-for-linux.whatsapp-for-linux /snap/bin/whatsapp-for-linux flags=(complain) { /proc/zoneinfo r, /proc/*/smaps r, network inet stream, network inet6 stream, }

— Reply to this email directly, view it on GitHub https://github.com/eneshecan/whatsapp-for-linux/issues/131#issuecomment-1377864910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCPGCJ33Y3SN5VJHAWNDXDWRXGHDANCNFSM5B4KPCMQ . You are receiving this because you were mentioned.Message ID: @.***>

tomcatcher commented 9 months ago

Hi all,

Has anyone asked the question why the app tries to read /proc/zoneinfo in the first place?

This is exactly what I was thinking - Why would a secure chat application need access to /proc/zoneinfo?

/proc/zoneinfo is a map of memory pages. I don't have enough time to investigate but will leave this here and be waiting for an answer from the developer. The question is:

Why does whatsapp need access to /proc/zoneinfo? Is it for performance monitoring?

I believe that allowing such access, only because we don't like it in the log is a very stupid thing to do!

Thanks for the answer, catcher