sock_recvmsg has dropped size argument

Bug #1701697 reported by Thadeu Lima de Souza Cascardo on 2017-06-30
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
iscsitarget (Ubuntu)
Undecided
CHOIHYUKJIN
Trusty
Undecided
Unassigned
Xenial
Undecided
Unassigned
linux (Ubuntu)
Undecided
Canonical Kernel Team
Xenial
Undecided
Unassigned

Bug Description

In linux-4.4.0-84, we backported commit 2da62906b1e298695e1bb725927041cd59942c98 ("[net] drop 'size' argument of sock_recvmsg()"), which breaks building iscsitarget.

Cascardo.
---
ApportVersion: 2.20.1-0ubuntu2.6
Architecture: amd64
DistroRelease: Ubuntu 16.04
Package: linux
PackageArchitecture: amd64
ProcVersionSignature: User Name 4.4.0-79.100-generic 4.4.67
Tags: xenial uec-images
Uname: Linux 4.4.0-79-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dialout dip floppy lxd netdev plugdev sudo video
_MarkForUpload: True
modified.conffile..etc.iet.ietd.conf: [inaccessible: [Errno 13] Permission denied: u'/etc/iet/ietd.conf']

CVE References

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-trusty/trusty/amd64/i/iscsitarget/20170630_143836_ce64a@/log.gz

/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/nthread.c: In function 'do_recv':
/var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/nthread.c:129:8: error: too many arguments to function 'sock_recvmsg'
  res = sock_recvmsg(conn->sock, &msg, len, MSG_DONTWAIT | MSG_NOSIGNAL);
        ^
In file included from include/linux/skbuff.h:29:0,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:17,
                 from include/linux/netdevice.h:42,
                 from include/net/sock.h:51,
                 from /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/iscsi.h:19,
                 from /var/lib/dkms/iscsitarget/1.4.20.3+svn502/build/kernel/nthread.c:16:
include/linux/net.h:220:5: note: declared here
 int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags);
     ^

Changed in linux (Ubuntu):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1701697

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete

apport information

tags: added: apport-collected uec-images xenial
description: updated

apport information

apport information

apport information

Changed in linux (Ubuntu):
status: Incomplete → New

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1701697

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete

I am working on a fix for the iscsitarget package.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in iscsitarget (Ubuntu):
status: New → In Progress
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)

Tested that iscsitarget builds on 4.4.0-79 and 4.4.0-84 after this patch.

The attachment "fixes failure to build with 4.4.0-84" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch

Hello Thadeu, or anyone else affected,

Accepted iscsitarget into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn502-2ubuntu4.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iscsitarget (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
tags: added: verification-done-xenial
removed: verification-needed-xenial
tags: added: verification-needed-xenial
removed: verification-done-xenial

There is a small bug in the match for reverting the patch on older kernels. I tested it on 4.4.0-79 and it worked, but it doesn't work on 4.4.0-83.

The match is written with "4\.\4\.0-8[0-3]", note the backslash right before the second 4.

I will send a debdiff against 1.4.20.3+svn502-2ubuntu4.2 fixing that.

Sorry about that.
Cascardo.

Changed in iscsitarget (Ubuntu Xenial):
status: Fix Committed → In Progress

Tested the new packages on both xenial and trusty with different kernels, including 4.4.0-21, 4.4.0-83 and 4.4.0-85.

Packages can be found in https://launchpad.net/~cascardo/+archive/ubuntu/ppa.

Cascardo.

Andy Whitcroft (apw) wrote :

Hello Thadeu, or anyone else affected,

Accepted iscsitarget into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn502-2ubuntu4.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iscsitarget (Ubuntu Xenial):
status: In Progress → Fix Committed
Andy Whitcroft (apw) wrote :

Hello Thadeu, or anyone else affected,

Accepted iscsitarget into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iscsitarget/1.4.20.3+svn499-0ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in iscsitarget (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed-trusty
Changed in linux (Ubuntu Xenial):
status: New → Fix Committed

iscsitarget, 1.4.20.3+svn499, 4.4.0-21-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn499, 4.4.0-79-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn499, 4.4.0-83-lowlatency, x86_64: installed
iscsitarget, 1.4.20.3+svn499, 4.4.0-86-generic, x86_64: installed

iscsitarget, 1.4.20.3+svn502, 4.4.0-21-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn502, 4.4.0-79-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn502, 4.4.0-83-generic, x86_64: installed
iscsitarget, 1.4.20.3+svn502, 4.4.0-86-generic, x86_64: installed

tags: added: verification-done-trusty verification-done-xenial
removed: verification-needed-trusty verification-needed-xenial

Added -proposed, did an upgrade and further dkms install and iscsitarget dkms was installed with success on all those kernels.

iscsitarget-dkms was upgraded when doing the linux-generic and linux-generic-lts-xenial upgrades, or whenever installing the linux-headers-4.4.0-86-{generic,lowlatency} packages.

Cascardo.

Andy Whitcroft (apw) wrote :

As these must be released before the associated kernels these will be released today on an expedited schedule. They will also necessarily be released to -security also.

The verification of the Stable Release Update for iscsitarget has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iscsitarget - 1.4.20.3+svn502-2ubuntu4.3

---------------
iscsitarget (1.4.20.3+svn502-2ubuntu4.3) xenial; urgency=medium

  * Fixed PATCH_MATCH in enable-4.4.0-84.patch so it will build with
    4.4.0-8[0-3] kernels. (LP: #1701697)

iscsitarget (1.4.20.3+svn502-2ubuntu4.2) xenial; urgency=medium

  * d/p/(porting|compat|enable)-4.4.0-84.patch:
    Add compat code to build with Ubuntu 4.4.0-84 (LP: #1701697)

 -- Thadeu Lima de Souza Cascardo <email address hidden> Wed, 12 Jul 2017 19:00:05 +0000

Changed in iscsitarget (Ubuntu Xenial):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iscsitarget - 1.4.20.3+svn499-0ubuntu2.3

---------------
iscsitarget (1.4.20.3+svn499-0ubuntu2.3) trusty; urgency=medium

  * d/p/(porting|compat|enable)-4.4.0-84.patch:
    Add compat code to build with Ubuntu 4.4.0-84 (LP: #1701697)

 -- Thadeu Lima de Souza Cascardo <email address hidden> Wed, 12 Jul 2017 20:13:41 +0000

Changed in iscsitarget (Ubuntu Trusty):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Andreas Hasenack (ahasenack) wrote :

Is this bug relevant for > xenial? I can't see an iscsitarget package in yakkety, zesty or artful.

No, not revelant for anything but 4.4 derived kernels, that is, Xenial, Xenial derivatives and lts-xenial on Trusty.

So, this iscsitarget-dkms fails with other kernels, like linux-raspi2, linux-aws, etc.

debdiff against iscsitarget_1.4.20.3+svn502-2ubuntu4.1 is at http://pastebin.ubuntu.com/25132171/.

Building packages at ppa:cascardo/ppa.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 4.4.0-87.110

---------------
linux (4.4.0-87.110) xenial; urgency=low

  * linux: 4.4.0-87.110 -proposed tracker (LP: #1704982)

  * CVE-2017-1000364
    - mm/mmap.c: do not blow on PROT_NONE MAP_FIXED holes in the stack
    - mm/mmap.c: expand_downwards: don't require the gap if !vm_prev

  * CIFS causes oops (LP: #1704857)
    - CIFS: Fix null pointer deref during read resp processing
    - CIFS: Fix some return values in case of error in 'crypt_message'

 -- Kleber Sacilotto de Souza <email address hidden> Tue, 18 Jul 2017 13:58:43 +0200

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
CHOIHYUKJIN (ils1994) on 2018-09-01
Changed in iscsitarget (Ubuntu):
assignee: Thadeu Lima de Souza Cascardo (cascardo) → CHOIHYUKJIN (ils1994)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers