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

WiFi not working due to new sepolicy flag #7764

Closed
a6680 opened this issue Feb 5, 2024 · 30 comments
Closed

WiFi not working due to new sepolicy flag #7764

a6680 opened this issue Feb 5, 2024 · 30 comments
Labels
confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core regression Something works in previous versions but not in the current one

Comments

@a6680
Copy link

a6680 commented Feb 5, 2024

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine.
Device: Wayne (Xiaomi 6x)
Android version: 10 (CarbonROM)
Magisk version name: 27.0
Magisk version code: 27001

wifi_log.txt

@a6680
Copy link
Author

a6680 commented Feb 5, 2024

WiFi log provided

@yujincheng08
Copy link
Collaborator

also need magisk log

@yujincheng08 yujincheng08 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
@yujincheng08 yujincheng08 reopened this Feb 5, 2024
@yujincheng08
Copy link
Collaborator

yujincheng08 commented Feb 5, 2024

Oh after further investigation I know what is going on now. It's a regression on Android 10- with RTM_GETLINK patched kernel. I have no idea about if it's fixable or if it's responsible for magisk.

@yujincheng08 yujincheng08 added the regression Something works in previous versions but not in the current one label Feb 5, 2024
@zeeshanmuhammad
Copy link

zeeshanmuhammad commented Feb 5, 2024

I am also experiencing this exact issue ("IP Configuration Failure" string label being shown in Android's Wifi connection area).

Development device and OS/ROM details:

Device: OnePlus 5 (cheeseburger)
Android version: 10 (crDroid v6.17)
Magisk version name: 27.0
Magisk version code: 27001

Upgraded from working Magisk v26.4.

@aviraxp
Copy link
Contributor

aviraxp commented Feb 6, 2024

Ask your kernel devs to revert commit https://review.lineageos.org/#/c/301314.

This commit shouldn't be ported to any Android 10- devices, as this commit only exists on android common kernel started from 11.

@vvb2060 vvb2060 added wontfix Not going to fix it not our issue This issue is caused by third-party like customized rom or module and removed regression Something works in previous versions but not in the current one labels Feb 6, 2024
@vvb2060 vvb2060 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@vvb2060 vvb2060 pinned this issue Feb 6, 2024
@LilithMorningstar666
Copy link

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine.
Device: Wayne (Xiaomi 6x)
Android version: 10 (CarbonROM)
Magisk version name: 27.0
Magisk version code: 27001

wifi_log.txt

Same issue on miui 12.5.3 android 10. For the moment I'm returning to 26.4

@vvb2060
Copy link
Collaborator

vvb2060 commented Feb 6, 2024

#7636

If you know what this is doing, you can try it, we don't offer any support for this.

allow netdomain netdomain netlink_route_socket { bind nlmsg_readpriv nlmsg_getneigh }

@UnMarshmallow
Copy link

UnMarshmallow commented Feb 6, 2024

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine. Device: Wayne (Xiaomi 6x) Android version: 10 (CarbonROM) Magisk version name: 27.0 Magisk version code: 27001

wifi_log.txt

I also have this problem but after switching the SELinux to permissive the wifi works again, for the moment he only has this solution for me.

@LilithMorningstar666
Copy link

If you know what this is doing, you can try it, we don't offer any support for this.

allow netdomain netdomain netlink_route_socket { bind nlmsg_readpriv nlmsg_getneigh }

Selinux rule? Creating a mulde with this command on a sepolicy.rule will fix WiFi on android 10?

@LilithMorningstar666
Copy link

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine. Device: Wayne (Xiaomi 6x) Android version: 10 (CarbonROM) Magisk version name: 27.0 Magisk version code: 27001

wifi_log.txt

I also have this problem but after switching the SELinux to permissive the wifi works again, for the moment he only has this solution for me.

Can you return to enforce selinux and try this module? It's supposed to fix WiFi on android 10 with magisk v27

wifi_fix_1.0.zip

@UnMarshmallow
Copy link

UnMarshmallow commented Feb 6, 2024

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine. Device: Wayne (Xiaomi 6x) Android version: 10 (CarbonROM) Magisk version name: 27.0 Magisk version code: 27001
wifi_log.txt

I also have this problem but after switching the SELinux to permissive the wifi works again, for the moment he only has this solution for me.

Can you return to enforce selinux and try this module? It's supposed to fix WiFi on android 10 with magisk v27

wifi_fix_1.0.zip

Well... According to my test, this does not solve the problem regarding WiFi. Always the error "IP configuration failed"

@LilithMorningstar666
Copy link

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine. Device: Wayne (Xiaomi 6x) Android version: 10 (CarbonROM) Magisk version name: 27.0 Magisk version code: 27001
wifi_log.txt

I also have this problem but after switching the SELinux to permissive the wifi works again, for the moment he only has this solution for me.

Can you return to enforce selinux and try this module? It's supposed to fix WiFi on android 10 with magisk v27

wifi_fix_1.0.zip

Well... According to my test, this does not solve the problem regarding WiFi. Always the error "IP configuration failed"

Well I tried xf thanks for your test 👍

@Djkusuma182
Copy link

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine. Device: Wayne (Xiaomi 6x) Android version: 10 (CarbonROM) Magisk version name: 27.0 Magisk version code: 27001

wifi_log.txt

same. me to.

After trying to update to Magisk 27.0 (27001) on Android 10, WiFi still says "IP configuration failed" and WiFi doesn't work. However, with Magisk 26.4 (26400), the WiFi works fine. Device: Wayne (Xiaomi 6x) Android version: 10 (CarbonROM) Magisk version name: 27.0 Magisk version code: 27001
wifi_log.txt

I also have this problem but after switching the SELinux to permissive the wifi works again, for the moment he only has this solution for me.

Can you return to enforce selinux and try this module? It's supposed to fix WiFi on android 10 with magisk v27

wifi_fix_1.0.zip

not working for me.

@andrewcharnley
Copy link

I don't know why this was closed.

The issue exists on 26.4 if zygisk is enabled (or maybe zygisk + enforcing).

Going back to 26.3 and all is working again, so the change was introduced in 26.4.

@LilithMorningstar666
Copy link

I don't know why this was closed.

The issue exists on 26.4 if zygisk is enabled (or maybe zygisk + enforcing).

Going back to 26.3 and all is working again, so the change was introduced in 26.4.

Kernel issue, search for an update kernel to your device. It's sad but it's true magisk team can't solve it

@andrewcharnley
Copy link

Perhaps but the issue doesn't exist on 26.3 so maybe we need a choice?

@LilithMorningstar666
Copy link

Perhaps but the issue doesn't exist on 26.3 so maybe we need a choice?

Probably magisk change their code and something it's conflicting with a sepolicy of the kernel. On the top a magisk team person says that it's related to WiFi permission sepolicy. Kernels are using a new sepolicy that was introduced on a11

@LilithMorningstar666
Copy link

Perhaps but the issue doesn't exist on 26.3 so maybe we need a choice?

Probably magisk change their code and something it's conflicting with a sepolicy of the kernel. On the top a magisk team person says that it's related to WiFi permission sepolicy. Kernels are using a new sepolicy that was introduced on a11

My usage kernel release a new version with fix for WiFi on magisk v27

@canyie canyie added regression Something works in previous versions but not in the current one and removed wontfix Not going to fix it not our issue This issue is caused by third-party like customized rom or module labels Feb 11, 2024
@canyie canyie added confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core labels Feb 11, 2024
@canyie canyie reopened this Feb 11, 2024
@vvb2060 vvb2060 unpinned this issue Feb 11, 2024
@vvb2060
Copy link
Collaborator

vvb2060 commented Feb 11, 2024

We should keep the sepolicy flag unchanged

@andrewcharnley
Copy link

FYI the following didn't fix it for me either, on 26.4 or 27. The module someone posted above is doing the same thing.

allow netdomain netdomain netlink_route_socket { bind nlmsg_readpriv nlmsg_getneigh }

@vvb2060 vvb2060 changed the title WiFi not working properly WiFi not working due to new sepolicy flag Feb 11, 2024
@vvb2060
Copy link
Collaborator

vvb2060 commented Feb 11, 2024

Updated the title, if it still doesn't work after allowing the rule then it's not the same issue, please open a new issue.
This issue is only for regressions introduced by the fix to #7636.

Tiktodz added a commit to Tiktodz/android_kernel_asus_sdm636 that referenced this issue Feb 14, 2024
This reverts commit 254f50d.

* topjohnwu/Magisk#7764 (comment)

Change-Id: I676bb41e088ee8ed8d6afc123e69a464ef6259db
Signed-off-by: dotkit <[email protected]>
Tiktodz added a commit to Tiktodz/android_kernel_asus_sdm636 that referenced this issue Feb 14, 2024
This reverts commit 254f50d.

* topjohnwu/Magisk#7764 (comment)

Change-Id: I02a44ccb63cd3706b5a0af27f1e35ce37f720256
Tiktodz added a commit to Tiktodz/android_kernel_asus_sdm636 that referenced this issue Feb 16, 2024
This reverts commit 254f50d.

* topjohnwu/Magisk#7764 (comment)

Change-Id: I02a44ccb63cd3706b5a0af27f1e35ce37f720256
@ilya-bystrov
Copy link

ilya-bystrov commented Mar 14, 2024

I am not an experienced user and it took me some time to figure out how to downgrade Magisk. It might be helpful for others.

I tried to downgrade Magisk through the Magisk App, and after rebooting, the phone was stuck at the boot logo.
I launched TWRP, uninstalled Magisk by renaming Magisk to 'uninstall.zip', rebooted, and then installed a other (older) version from TWRP, which fixed the issue.

https://twrp.me/
https://magiskmanager.com/

@zinhuofc
Copy link

here 26.4 works, the problem is only in versions 27, I tried with an updated kernel and not working

@aviraxp
Copy link
Contributor

aviraxp commented Mar 17, 2024

@Flamefire
Copy link

Flamefire commented Mar 17, 2024

allow netdomain netdomain netlink_route_socket { bind nlmsg_readpriv nlmsg_getneigh }

FWIW: audit2allow mentions:

allow ipacm self:netlink_route_socket nlmsg_readpriv;
allow netutils_wrapper self:netlink_route_socket nlmsg_readpriv;
allow network_stack self:netlink_route_socket nlmsg_readpriv;

So this should do:

allow netdomain self:netlink_route_socket nlmsg_readpriv;
allow netutils_wrapper self:netlink_route_socket nlmsg_readpriv;

However that is impossible on A10 due to netlink_route_socket not "knowing" about nlmsg_readpriv

Please test if https://github.com/aviraxp/Magisk/actions/runs/8313799418/artifacts/1332795391 works for you.

It does.

@senposage
Copy link

thx for this was just going to pull my v40 out of retirement to give to the the folks for a music player and encoutered this issue

@topjohnwu
Copy link
Owner

Fixed with d20b30c

@ManKetnas
Copy link

just updated magisk to v27.0 and got same issues. Where can I get the fixed application, dont like to downgrade, thx ?

@JumboMite
Copy link

I was experiencing the same problem with Android 9 on Magisk 27. I couldn't make a WiFi connection unless I set selinux to permissive.

I tried the latest Canary build (downloaded May 3rd), no change.

Downgraded to Magisk 26.3 as @andrewcharnley suggested and WiFi connections are possible again with Selinux enforcing.

@ManKetnas
Copy link

I was experiencing the same problem with Android 9

I personally dont care anymore, I did a backup of my data and swaped to crdroid after +5years.
Now I'm using KernelSu and I'm happy so far, I hope that I never have to use Magisk again. You always have to be frightened about every small change of a setting or uodate, its a nightmare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core regression Something works in previous versions but not in the current one
Projects
None yet
Development

Successfully merging a pull request may close this issue.