SSH sockets on overlayfs report connection refused

Bug #1262287 reported by Alkis Georgopoulos
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Reusing a master ssh socket that is created on an overlayfs mount reports connection refused, while on real filesystems or on tmpfs it works fine.

Steps to reproduce (/var is ext4, /tmp is tmpfs.):
# mkdir -p /var/overlayfs-socket
# cd /var/overlayfs-socket
# mkdir root rofs /tmp/cow
# mount -t overlayfs -o "upperdir=/tmp/cow,lowerdir=rofs" overlayfs root
# ssh -NMS root/socket alkisg@localhost
alkisg@localhost's password: [****]

And on another tab of the same terminal:
# ssh -S root/socket alkisg@localhost ls
Control socket connect(root/socket): Connection refused
alkisg@localhost's password:

The problem is in the last line, on real filesystems or on tmpfs it doesn't ask for a password, it reuses the existing socket.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.12.0-7-generic 3.12.0-7.15
ProcVersionSignature: Ubuntu 3.12.0-7.15-generic 3.12.4
Uname: Linux 3.12.0-7-generic i686
ApportVersion: 2.12.7-0ubuntu2
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: alkisg 3511 F.... pulseaudio
 /dev/snd/controlC0: alkisg 3511 F.... pulseaudio
CurrentDesktop: GNOME
Date: Wed Dec 18 18:57:18 2013
HibernationDevice: RESUME=UUID=5eff7bf1-95b5-4fc1-9c71-0950810c717e
InstallationDate: Installed on 2013-10-31 (48 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20131021.1)
MachineType: System manufacturer System Product Name
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.12.0-7-generic root=UUID=e1f06e01-d2dc-45e5-b446-54e1e4a5dc2c ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.12.0-7-generic N/A
 linux-backports-modules-3.12.0-7-generic N/A
 linux-firmware 1.117
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/04/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0415
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: P5KPL-AM EPU
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: x.0x
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0415:bd02/04/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP5KPL-AMEPU:rvrx.0x:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.13 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-rc4-trusty/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

AFAIK, overlayfs is not mainlined yet.

The problem I reported exists in the Ubuntu patched kernels of at least Precise, Raring and Trusty though.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
penalvch (penalvch)
tags: added: bios-outdated-0501
penalvch (penalvch)
tags: added: precise raring
tags: added: bot-stop-nagging
Revision history for this message
Tomasz Cholewa (slashroot) wrote :

Hi guys,

I've been struggling with similar issue in centos 6.6. In previous version (6.5) everything worked fine, but after update I wasn't able to set socket for ssh control master on overlayfs. I made some tedious research and comparisons and it turned out that it's not about the kernel (made few downgrades) but ssh.
According to https://bugzilla.redhat.com/show_bug.cgi?id=953088 in ssh version included in RHEL 6.6 (and CentOS) there was a patch witch modifies behaviour of creating control socket. When I downgraded ssh packages (openssh{,-clients,-server}) to the version without that patch (5.3p1-94.el6) everything worked like a charm!

I hope it will also help you to solve your problem in Ubuntu.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.