Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.11.1
-
None
Description
The SE Linux configuration in all Android 6+ installs disallows use of certain ioctl commands. Android logcat complains:
07-23 15:38:30.783 916 916 E audit : type=1400 audit(1532385510.767:4600): avc: denied { ioctl } for pid=14602 comm="QtThread" path="socket:[1093766]" dev="sockfs" ino=1093766 ioctlcmd=8927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:untrusted_app:s0:c512,c768 tclass=tcp_socket permissive=0 SEPF_SM-G950U_8.0.0_0009 audit_filtered
07-23 15:38:30.784 916 916 E audit : type=1300 audit(1532385510.767:4600): arch=40000028 syscall=54 per=8 success=no exit=-13 a0=3f a1=8927 a2=c6b7f50c a3=10000 items=0 ppid=955 pid=14602 auid=4294967295 uid=10252 gid=10252 euid=10252 suid=10252 fsuid=10252 egid=10252 sgid=10252 fsgid=10252 tty=(none) ses=4294967295 comm="QtThread" exe="/system/bin/app_process32" subj=u:r:untrusted_app:s0:c512,c768 key=(null)
07-23 15:38:30.784 916 916 E audit : type=1327 audit(1532385510.767:4600): proctitle="com.example:service"
This is coming from file qtbase/src/network/kernel/qnetworkinterface_unix.cpp in function interfaceListing() :
#ifdef SIOCGIFHWADDR
// Get the HW address
if (qt_safe_ioctl(socket, SIOCGIFHWADDR, &req) >= 0) { bq. uchar *addr = (uchar *)req.ifr_addr.sa_data; bq. iface->hardwareAddress = iface->makeHwAddress(6, addr); bq. }
#endif
Calling ioctl in this way is disallowed per this google android issue:
https://issuetracker.google.com/issues/37068066