View Issue Details

IDProjectCategoryView StatusLast Update
0003012Kali LinuxGeneral Bugpublic2017-12-06 15:13
Reporterbinkybear Assigned Tomuts  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Versionkali-dev 
Summary0003012: apt-get errors in kali-dev
Description

When working on Nethunter chroot in Android we are getting apt-get errors with kali-rolling. It appears that something is firewalling or filtering out our connection with permission denied.

A normal apt-get update returns:

apt-get update
Err:1 http://http.kali.org/kali kali-rolling InRelease
Temporary failure resolving 'http.kali.org'

Changing to IP only in apt sources returns this error:

root@kali:~# apt-get update
Ign:1 http://50.7.55.82/kali kali-rolling InRelease
Ign:2 http://50.7.55.82/kali kali-rolling Release
Ign:3 http://50.7.55.82/kali kali-rolling/main armhf Packages
Ign:4 http://50.7.55.82/kali kali-rolling/main all Packages
Ign:5 http://50.7.55.82/kali kali-rolling/main Translation-en
Ign:6 http://50.7.55.82/kali kali-rolling/contrib armhf Packages
Ign:7 http://50.7.55.82/kali kali-rolling/contrib all Packages
Ign:8 http://50.7.55.82/kali kali-rolling/contrib Translation-en
Ign:9 http://50.7.55.82/kali kali-rolling/non-free armhf Packages
Ign:10 http://50.7.55.82/kali kali-rolling/non-free all Packages
Ign:11 http://50.7.55.82/kali kali-rolling/non-free Translation-en
Ign:3 http://50.7.55.82/kali kali-rolling/main armhf Packages
Ign:4 http://50.7.55.82/kali kali-rolling/main all Packages
Ign:5 http://50.7.55.82/kali kali-rolling/main Translation-en
Ign:6 http://50.7.55.82/kali kali-rolling/contrib armhf Packages
Ign:7 http://50.7.55.82/kali kali-rolling/contrib all Packages
Ign:8 http://50.7.55.82/kali kali-rolling/contrib Translation-en
Ign:9 http://50.7.55.82/kali kali-rolling/non-free armhf Packages
Ign:10 http://50.7.55.82/kali kali-rolling/non-free all Packages
Ign:11 http://50.7.55.82/kali kali-rolling/non-free Translation-en
Ign:3 http://50.7.55.82/kali kali-rolling/main armhf Packages
Ign:4 http://50.7.55.82/kali kali-rolling/main all Packages
Ign:5 http://50.7.55.82/kali kali-rolling/main Translation-en
Ign:6 http://50.7.55.82/kali kali-rolling/contrib armhf Packages
Ign:7 http://50.7.55.82/kali kali-rolling/contrib all Packages
Ign:8 http://50.7.55.82/kali kali-rolling/contrib Translation-en
Ign:9 http://50.7.55.82/kali kali-rolling/non-free armhf Packages
Ign:10 http://50.7.55.82/kali kali-rolling/non-free all Packages
Ign:11 http://50.7.55.82/kali kali-rolling/non-free Translation-en
Ign:3 http://50.7.55.82/kali kali-rolling/main armhf Packages
Ign:4 http://50.7.55.82/kali kali-rolling/main all Packages
Ign:5 http://50.7.55.82/kali kali-rolling/main Translation-en
Ign:6 http://50.7.55.82/kali kali-rolling/contrib armhf Packages
Ign:7 http://50.7.55.82/kali kali-rolling/contrib all Packages
Ign:8 http://50.7.55.82/kali kali-rolling/contrib Translation-en
Ign:9 http://50.7.55.82/kali kali-rolling/non-free armhf Packages
Ign:10 http://50.7.55.82/kali kali-rolling/non-free all Packages
Ign:11 http://50.7.55.82/kali kali-rolling/non-free Translation-en
Ign:3 http://50.7.55.82/kali kali-rolling/main armhf Packages
Ign:4 http://50.7.55.82/kali kali-rolling/main all Packages
Ign:5 http://50.7.55.82/kali kali-rolling/main Translation-en
Ign:6 http://50.7.55.82/kali kali-rolling/contrib armhf Packages
Ign:7 http://50.7.55.82/kali kali-rolling/contrib all Packages
Ign:8 http://50.7.55.82/kali kali-rolling/contrib Translation-en
Ign:9 http://50.7.55.82/kali kali-rolling/non-free armhf Packages
Ign:10 http://50.7.55.82/kali kali-rolling/non-free all Packages
Ign:11 http://50.7.55.82/kali kali-rolling/non-free Translation-en
Err:3 http://50.7.55.82/kali kali-rolling/main armhf Packages
Could not create a socket for 50.7.55.82 (f=2 t=1 p=6) - socket (13: Permission denied)
Ign:4 http://50.7.55.82/kali kali-rolling/main all Packages
Ign:5 http://50.7.55.82/kali kali-rolling/main Translation-en
Err:6 http://50.7.55.82/kali kali-rolling/contrib armhf Packages
Could not create a socket for 50.7.55.82 (f=2 t=1 p=6) - socket (13: Permission denied)
Ign:7 http://50.7.55.82/kali kali-rolling/contrib all Packages
Ign:8 http://50.7.55.82/kali kali-rolling/contrib Translation-en
Err:9 http://50.7.55.82/kali kali-rolling/non-free armhf Packages
Could not create a socket for 50.7.55.82 (f=2 t=1 p=6) - socket (13: Permission denied)
Ign:10 http://50.7.55.82/kali kali-rolling/non-free all Packages
Ign:11 http://50.7.55.82/kali kali-rolling/non-free Translation-en
Reading package lists... Done
W: The repository 'http://50.7.55.82/kali kali-rolling Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Failed to fetch http://50.7.55.82/kali/dists/kali-rolling/main/binary-armhf/Packages Could not create a socket for 50.7.55.82 (f=2 t=1 p=6) - socket (13: Permission denied)
W: Failed to fetch http://50.7.55.82/kali/dists/kali-rolling/contrib/binary-armhf/Packages Could not create a socket for 50.7.55.82 (f=2 t=1 p=6) - socket (13: Permission denied)
W: Failed to fetch http://50.7.55.82/kali/dists/kali-rolling/non-free/binary-armhf/Packages Could not create a socket for 50.7.55.82 (f=2 t=1 p=6) - socket (13: Permission denied)
E: Some index files failed to download. They have been ignored, or old ones used instead.

Steps To Reproduce

apt-get update

Additional Information

Changing DNS servers does not help. We can ping and dig http.kali.org without errors. Multiple users have reported same error.

Activities

binkybear

binkybear

2016-01-24 14:24

reporter   ~0004600

Also tried changing DNS servers to OpenDNS and Google DNS with same error.

binkybear

binkybear

2016-01-26 20:26

reporter   ~0004619

Issues seem to be related to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807371 with introduction of new user _apt. Trying to cat resolve.conf from user _apt results in permission denied:

root@kali:/# su _apt -s /bin/sh -c "cat /etc/resolv.conf"
cat: /etc/resolv.conf: Permission denied

By default in chroot:

root@kali:/# ls -l |grep etc
drwxr-xr-x. 123 root root 8192 Jan 26 15:33 etc
root@kali:/# ls -l /etc/resolv.conf
-rw-------. 1 root root 75 Jan 26 15:33 /etc/resolv.conf
root@kali:/# ls -l /etc/hosts
-rw-r--r--. 1 root root 84 Jan 26 15:33 /etc/hosts

Changing permissions on resolv.conf to 644 allows it to be read but doesn't solve issues:
root@kali:/# su _apt -s /bin/sh -c "cat /etc/resolv.conf"
nameserver 208.67.222.222
nameserver 208.67.220.220

Being dangerous I changed _apt UID: _apt:x:0:65534::/nonexistent:/bin/false and it works! I moved _apt to GID instead:

_apt:x:104:3004::/nonexistent:/bin/false

It works now (issue can be closed).

rhertzog

rhertzog

2016-01-27 08:13

administrator   ~0004621

What is GID 3004 on your system?

So you believe that the fact that the _apt user is part of "nogroup" is actually the problem? Does Android treat the nogroup in some special way?

muts

muts

2016-02-02 23:21

reporter   ~0004656

This was fixed in our nethunter builds.

Issue History

Date Modified Username Field Change
2016-01-24 14:04 binkybear New Issue
2016-01-24 14:24 binkybear Note Added: 0004600
2016-01-26 20:26 binkybear Note Added: 0004619
2016-01-27 08:13 rhertzog Note Added: 0004621
2016-02-02 23:21 muts Note Added: 0004656
2016-02-02 23:21 muts Status new => closed
2016-02-02 23:21 muts Assigned To => muts
2016-02-02 23:21 muts Resolution open => fixed