Bug 94181 - Regression in msgrcv() for 32-bit applications on running on x86_64
Summary: Regression in msgrcv() for 32-bit applications on running on x86_64
Status: CLOSED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-03 14:48 UTC by John.Bollinger
Modified: 2018-06-27 20:29 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.10.70
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Cast the argument to signed type before passing it down. (884 bytes, patch)
2015-03-03 15:13 UTC, Alan Bartlett
Details | Diff

Description John.Bollinger 2015-03-03 14:48:34 UTC
The msgrcv() syscall in kernel 3.10.70 does not behave as documented when called with a negative fourth argument ('msgtyp') by a 32-bit application.  The same issue was reported by someone else against the CentOS 7 kernel (https://bugs.centos.org/view.php?id=7099), which is a customized version of kernel 3.10.0, but I ran into it on builds of the stock kernel, as configured and packaged by ELRepo (http://elrepo.org/tiki/kernel-lt).  The CentOS report has characterization, a test program, and a patch (https://bugs.centos.org/view.php?id=7099#c20187) that resolves the issue for me.

I first ran into the issue with kernel 3.10.66; I have not determined how much further back it goes.

I initially filed this issue against ELRepo's kernel-lt package (http://elrepo.org/bugs/view.php?id=556), and per ELRepo's request I am filing a corresponding report here.  Evidently there also is or was a corresponding issue reported against RedHat Enterprise.
Comment 1 Akemi Yagi 2015-03-03 15:13:19 UTC
Just a short note to add that the patch as presented in https://lkml.org/lkml/2014/1/15/253 is in the current 3.19 mainline kernel.
Comment 2 Alan Bartlett 2015-03-03 15:13:23 UTC
Created attachment 168741 [details]
Cast the argument to signed type before passing it down.

This patch is present in mainline (3.19) but absent in stable (3.10.70).
Comment 3 Alan Bartlett 2015-04-22 14:56:41 UTC
The relevant patch has now been queued for the linux-3.10.X series.

See -- https://lkml.org/lkml/2015/4/17/263 [^]
Comment 4 Alan Bartlett 2015-04-22 15:08:30 UTC
Upon checking the changelog [1] of the linux-3.10.75 tarball, I see that the required patch is finally present.

[1] https://www.kernel.org/pub/linux/kernel/v3.x/ChangeLog-3.10.75
Comment 5 Randy Dunlap 2018-06-21 06:38:00 UTC
Thanks, closing.

Note You need to log in before you can comment on or make changes to this bug.