summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Ben Hutchings [Wed, 28 Apr 2021 02:03:49 +0000 (04:03 +0200)]
[klibc] malloc: Fail if requested size > PTRDIFF_MAX
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
a31ae8c508fc8d1bca4f57e9f9f88127572d5202
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2021-31873
malloc() adds some overhead to the requested size, which may result in
an integer overflow and subsequent buffer overflow if it is close to
SIZE_MAX. It should fail if size is large enough for this to happen.
Further, it's not legal for a C object to be larger than
PTRDIFF_MAX (half of SIZE_MAX) as pointer arithmetic within it could
overflow. So return failure immediately if size is greater than that.
CVE-2021-31873
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0036-klibc-malloc-Fail-if-requested-size-PTRDIFF_MAX.patch
Ben Hutchings [Wed, 28 Apr 2021 01:57:39 +0000 (03:57 +0200)]
[klibc] malloc: Set errno on failure
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
7f6626d12daa2f1efd9953d1f4ba2065348dc5cd
malloc() is specified to set errno = ENOMEM on failure, so do that.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0035-klibc-malloc-Set-errno-on-failure.patch
Ben Hutchings [Fri, 28 Aug 2020 16:36:34 +0000 (17:36 +0100)]
[klibc] ia64: Fix definition of struct sigaction
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
811bff9cec254e3396493f4f2447862d252870ac
ia64 only provides the RT signal API, in which the type of sa_flags is
unsigned long and sa_mask is the last member of the struct.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0001-klibc-ia64-Fix-definition-of-struct-sigaction.patch
Ben Hutchings [Thu, 30 Apr 2020 12:56:47 +0000 (13:56 +0100)]
[klibc] sparc: Set sa_restorer for signals and disable executable stack
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
05350b72cace18417c1ba00c4796a5e19ebb908b
sparc allows specifiying a signal restorer in the usual way. We
should do this to avoid needing an executable stack.
* Define a __sigreturn() routine that calls rt_sigreturn
* Force the SA_RESTORER flag on for all signal handlers, and set
__sigreturn as the restorer if none is already set
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
always return from them with rt_sigreturn
* Set KLIBCEXECSTACK=n
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0005-klibc-sparc-Set-sa_restorer-for-signals-and-disable-.patch
Ben Hutchings [Sun, 23 Aug 2020 14:18:19 +0000 (15:18 +0100)]
[klibc] alpha: Pass restorer to rt_sigaction() and disable executable stack
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
570ed1e207cbe38ed487c722f8ac7db68e664a94
alpha does not support the SA_RESTORER flag, but allows specifiying a
restorer callback as an additional parameter to rt_sigaction(). We
should do this to avoid needing an executable stack.
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
always return from them with rt_sigreturn
* Define a __sigreturn() routine that calls rt_sigreturn
* Pass that routine as the last argument to rt_sigaction()
* Set KLIBCEXECSTACK=n
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0004-klibc-alpha-Pass-restorer-to-rt_sigaction-and-disabl.patch
Ben Hutchings [Thu, 30 Apr 2020 02:38:34 +0000 (03:38 +0100)]
[klibc] s390: Set sa_restorer for signals and disable executable stack
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
c341c978e3024b9c575fac94012fc5b6f5679334
s390 allows specifiying a signal restorer in the usual way. We
should do this to avoid needing an executable stack.
* Define a __sigreturn() routine that calls rt_sigreturn
* Force the SA_RESTORER flag on for all signal handlers, and set
__sigreturn as the restorer if none is already set
* Force the SA_SIGINFO flag on for all signal handlers, so that we can
always return from them with rt_sigreturn
* Set KLIBCEXECSTACK=n
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0003-klibc-s390-Set-sa_restorer-for-signals-and-disable-e.patch
Ben Hutchings [Tue, 25 Aug 2020 00:05:28 +0000 (01:05 +0100)]
[klibc] signal: Add sysconfig setting to force SA_SIGINFO on
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
2a2a0b6b79c2470f529daabd5c193f58fe188337
On alpha, arm, i386, m68k, powerpc, s390, sh, and sparc (32-bit), the
kernel sets up the signal stack frame differently depending on the
SA_SIGINFO flag, not whether the sigaction() or rt_sigaction() system
call was used to install the handler.
On alpha and sparc, we are going to start providing our own restorer
that will call rt_sigaction(), so will need to ensure this flag is
always set.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0002-klibc-signal-Add-sysconfig-setting-to-force-SA_SIGIN.patch
Ben Hutchings [Mon, 24 Aug 2020 23:43:33 +0000 (00:43 +0100)]
[klibc] signal: Note another reason to define _KLIBC_NEEDS_SA_RESTORER
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
ccc5c14c44f3fa76f61b8aae947cf3b853a6c833
On some architectures we should set SA_RESTORER to avoid the need for
a signal trampoline and executable stack.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0001-klibc-signal-Note-another-reason-to-define-_KLIBC_NE.patch
Ben Hutchings [Thu, 27 Aug 2020 00:58:19 +0000 (01:58 +0100)]
[klibc] alpha: Fix definitions of _NSIG and struct sigaction
Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=
1cd11aaed1dece773c6b1ce2e99a0fe98b51321e
We use the RT signals API, but include the kernel UAPI header
that defines _NSIG and struct sigaction for the old API.
Copy over all the definitions and fix those two.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name 0001-klibc-alpha-Fix-definitions-of-_NSIG-and-struct-siga.patch
Ben Hutchings [Fri, 30 Apr 2021 01:05:23 +0000 (02:05 +0100)]
klibc (2.0.8-6) unstable; urgency=medium
* Upload to unstable
* malloc: Set errno on failure
* malloc: Fail if requested size > PTRDIFF_MAX (CVE-2021-31873)
* calloc: Fail if multiplication overflows (CVE-2021-31870)
* cpio: Fix possible integer overflow on 32-bit systems (CVE-2021-31872)
* cpio: Fix possible crash on 64-bit systems (CVE-2021-31871)
[dgit import unpatched klibc 2.0.8-6]
Ben Hutchings [Fri, 30 Apr 2021 01:05:23 +0000 (02:05 +0100)]
Import klibc_2.0.8-6.debian.tar.xz
[dgit import tarball klibc 2.0.8-6 klibc_2.0.8-6.debian.tar.xz]
Ben Hutchings [Fri, 21 Aug 2020 00:34:13 +0000 (01:34 +0100)]
Import klibc_2.0.8.orig.tar.xz
[dgit import orig klibc_2.0.8.orig.tar.xz]