Commit graph

4595 commits

Author SHA1 Message Date
Nick Kralevich
c46871302e Merge "libc: upgrade some libc functions to _FORTIFY_SOURCE=2" 2013-04-30 18:51:22 +00:00
Nick Kralevich
9020fd503c libc: upgrade some libc functions to _FORTIFY_SOURCE=2
Upgrade the following functions:

* vsnprintf
* vsprintf
* snprintf
* fgets
* strcpy
* strcat
* strncat
* strlcpy
* strlcat
* strlen
* strchr

Change-Id: Icc036fc7f0bb317e05f7c051617887a1601271aa
2013-04-30 11:31:35 -07:00
Nick Kralevich
aed0c3ac54 am b94b2851: Merge "libc: upgrade sprintf to _FORTIFY_SOURCE=2"
* commit 'b94b2851d72187cc9095864a9c99429ee62d7786':
  libc: upgrade sprintf to _FORTIFY_SOURCE=2
2013-04-29 16:56:29 -07:00
Nick Kralevich
b94b2851d7 Merge "libc: upgrade sprintf to _FORTIFY_SOURCE=2" 2013-04-29 23:50:46 +00:00
Nick Kralevich
78d6d9888c libc: upgrade sprintf to _FORTIFY_SOURCE=2
Upgrade sprintf to fortify_source level 2, to catch
additional security bugs.

Change-Id: Ibc957d65e4cb96152de84b3745a04e00fa22659e
2013-04-29 16:41:54 -07:00
Nick Kralevich
56a1b492c4 am 382a7753: Merge "strncpy: implement _FORTIFY_SOURCE=2"
* commit '382a7753786646483a8101f4e337f9e3a82ec852':
  strncpy: implement _FORTIFY_SOURCE=2
2013-04-29 16:25:41 -07:00
Nick Kralevich
382a775378 Merge "strncpy: implement _FORTIFY_SOURCE=2" 2013-04-29 23:07:33 +00:00
Nick Kralevich
1aae9bd170 strncpy: implement _FORTIFY_SOURCE=2
Add support for fortify source level 2 to strncpy.
This will enable detection of more areas where strncpy
is used inappropriately. For example, this would have detected
bug 8727221.

Move the fortify_source tests out of string_test.cpp, and
put it into fortify1_test.cpp.

Create a new fortify2_test.cpp file, which copies all
the tests in fortify1_test.cpp, and adds fortify_source level
2 specific tests.

Change-Id: Ica0fba531cc7d0609e4f23b8176739b13f7f7a83
2013-04-29 15:22:10 -07:00
Nick Kralevich
89357dc730 am c6dc62f0: Merge "[NETFILTER]: Fix iptables ABI breakage"
* commit 'c6dc62f09c814b9688aee83e80dcfe80cb0ef604':
  [NETFILTER]: Fix iptables ABI breakage
2013-04-29 12:51:35 -07:00
Nick Kralevich
c6dc62f09c Merge "[NETFILTER]: Fix iptables ABI breakage" 2013-04-29 19:44:30 +00:00
Nick Kralevich
e66ad7809e [NETFILTER]: Fix iptables ABI breakage
Pick up Linux kernel patch 2748e5dec7ca8a3804852c7c4171f9156384d15c
from 2007

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2748e5dec7ca8a3804852c7c4171f9156384d15c

[NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
With the introduction of x_tables we accidentally broke compatibility
by defining IPT_TABLE_MAXNAMELEN to XT_FUNCTION_MAXNAMELEN instead of
XT_TABLE_MAXNAMELEN, which is two bytes larger.

On most architectures it doesn't really matter since we don't have
any tables with names that long in the kernel and the structure
layout didn't change because of alignment requirements of following
members. On CRIS however (and other architectures that don't align
data) this changed the structure layout and thus broke compatibility
with old iptables binaries.

Changing it back will break compatibility with binaries compiled
against recent kernels again, but since the breakage has only been
there for three releases this seems like the better choice.

Change-Id: Ie9552b25892109c7042b9752132dc8ebd3552dc3
2013-04-29 12:31:01 -07:00
Andrew Hsieh
83966db80b am f7153fd1: Merge "Remove redundant space within square brackets"
* commit 'f7153fd13f469e9ba5aecbfa00fde42530ca2124':
  Remove redundant space within square brackets
2013-04-25 21:22:26 -07:00
Andrew Hsieh
f7153fd13f Merge "Remove redundant space within square brackets" 2013-04-26 01:54:38 +00:00
Elliott Hughes
9aa57e09ef am 9ff1ffd8: Merge "Improve diagnostics in the face of bad tzdata."
* commit '9ff1ffd805b57160079f42d7eea051c63e0e2bca':
  Improve diagnostics in the face of bad tzdata.
2013-04-25 17:01:42 -07:00
Nick Kralevich
ed572aaa0d am 5f28fde8: Merge "linker: only re-open std* for setuid programs."
* commit '5f28fde8aeee047a70e344c9da937695dc51a3ba':
  linker: only re-open std* for setuid programs.
2013-04-25 17:01:41 -07:00
Elliott Hughes
9ff1ffd805 Merge "Improve diagnostics in the face of bad tzdata." 2013-04-25 22:31:14 +00:00
Elliott Hughes
e7aaad8b83 Improve diagnostics in the face of bad tzdata.
Bug: 8373554
Change-Id: If8df5e956105e01cce95221ff0a7fa9d2b474db3
2013-04-25 14:02:59 -07:00
Nick Kralevich
5f28fde8ae Merge "linker: only re-open std* for setuid programs." 2013-04-25 20:31:41 +00:00
Nick Kralevich
8d3e91d4f8 linker: only re-open std* for setuid programs.
get_AT_SECURE() was getting called before linker_env_init() had
been called, and returning the default value ("true"). This was
causing us to reopen closed stdin, stdout, and stderr for ALL
processes, not just privileged (setuid) processes.

Calling path:
  - __linker_init
    - soinfo_link_image
      - get_AT_SECURE
    - __linker_init_post_relocation
      - linker_env_init

This change restores the intended behavior of only re-opening
stdin, stdout, and stderr for privileged processes.

Change-Id: I8b085ea6597710ac4c1a3c93f1bf8b81eecb08c0
2013-04-25 13:15:24 -07:00
The Android Automerger
46de17d26d merge in jb-mr2-release history after reset to jb-mr2-dev 2013-04-25 05:55:12 -07:00
Andrew Hsieh
e8f46e8edd Remove redundant space within square brackets
The new "as" in binutils-2.23 (with gcc4.8) is more picky:
it expects register right after [

Change-Id: I876124841582070ab2083ffafe38bc333b5812d0
2013-04-25 15:05:03 +08:00
Elliott Hughes
eb22fc331e am 389b5c1e: Upgrade to tzdata2013c.
* commit '389b5c1ee52cbf0de4dcdfe266832d251f55db62':
  Upgrade to tzdata2013c.
2013-04-24 14:25:33 -07:00
Elliott Hughes
b6e895e80f am 87efcd2e: Merge "Don\'t avoid IPv6 when looking for new tzdata."
* commit '87efcd2e63c9f218f476ef88f21e660f9bce633f':
  Don't avoid IPv6 when looking for new tzdata.
2013-04-24 10:58:37 -07:00
Elliott Hughes
87efcd2e63 Merge "Don't avoid IPv6 when looking for new tzdata." 2013-04-24 17:52:29 +00:00
Elliott Hughes
85aeb49144 Don't avoid IPv6 when looking for new tzdata.
Our internal IPv6 FTP networking problems have been fixed.

Change-Id: I9949a13fa20a3b0f3845e565e1461320078d3f14
2013-04-24 10:50:45 -07:00
Elliott Hughes
389b5c1ee5 Upgrade to tzdata2013c.
From the release notes:

  Changes affecting current and future time stamps:

    Palestine observed DST starting March 29, 2013.  (Thanks to
    Steffen Thorsen.)  From 2013 on, Gaza and Hebron both observe DST,
    with the predicted rules being the last Thursday in March at 24:00
    to the first Friday on or after September 21 at 01:00.

    Assume that the recent change to Paraguay's DST rules is permanent,
    by moving the end of DST to the 4th Sunday in March every year.
    (Thanks to Carlos Raúl Perasso.)

  Changes affecting past time stamps:

    Fix some historical data for Palestine to agree with that of
    timeanddate.com, as follows:

          The spring 2008 change in Gaza and Hebron was on 00:00 Mar 28, not
          00:00 Apr 1.

          The fall 2009 change in Gaza and Hebron on Sep 4 was at 01:00, not
          02:00.

          The spring 2010 change in Hebron was 00:00 Mar 26, not 00:01 Mar 27.

          The spring 2011 change in Gaza was 00:01 Apr 1, not 12:01 Apr 2.

          The spring 2011 change in Hebron on Apr 1 was at 00:01, not 12:01.

          The fall 2011 change in Hebron on Sep 30 was at 00:00, not 03:00.

    Fix times of habitation for Macquarie to agree with the Tasmania
    Parks & Wildlife Service history, which indicates that permanent
    habitation was 1899-1919 and 1948 on.

  Changing affecting metadata only:

    Macquarie Island is politically part of Australia, not Antarctica.
    (Thanks to Tobias Conradi.)

    Sort Macquarie more-consistently with other parts of Australia.
    (Thanks to Tim Parenti.)

(cherry picked from commit 2379088a90)

Change-Id: I77d0ceebdba3489da0069f5792e930adc5810d34
2013-04-23 18:22:31 -07:00
Elliott Hughes
41dcafc276 am c705daa0: Merge "Disable IPv6 when looking for tzdata updates."
* commit 'c705daa0a2684d31b8ddc9230e7aa5573880adef':
  Disable IPv6 when looking for tzdata updates.
2013-04-22 16:55:59 -07:00
Elliott Hughes
c705daa0a2 Merge "Disable IPv6 when looking for tzdata updates." 2013-04-22 23:41:37 +00:00
Elliott Hughes
21da42ea91 Disable IPv6 when looking for tzdata updates.
My problems connecting to ftp.iana.org are only via IPv6.

Change-Id: I42e4bae7981ec4b64822f745a7a15544d77ef22d
2013-04-22 13:44:50 -07:00
Elliott Hughes
dc7e8b892d am 2c60c18c: Merge "Upgrade to tzdata2013c."
* commit '2c60c18c505491631a07380f80438fafa80d39f0':
  Upgrade to tzdata2013c.
2013-04-22 12:27:17 -07:00
Elliott Hughes
4f89ab3166 am bda2fb5e: Merge "Add signature checking to HTTP tzdata updates."
* commit 'bda2fb5efab914e8442ec9c38961b7182ac5978c':
  Add signature checking to HTTP tzdata updates.
2013-04-22 12:11:48 -07:00
Elliott Hughes
2c60c18c50 Merge "Upgrade to tzdata2013c." 2013-04-22 19:10:08 +00:00
Elliott Hughes
bda2fb5efa Merge "Add signature checking to HTTP tzdata updates." 2013-04-22 19:03:06 +00:00
Elliott Hughes
676e66db25 Add signature checking to HTTP tzdata updates.
Change-Id: Idcfd217eb215d6a170e6884be8d8ad28cd4fe70d
2013-04-22 11:41:57 -07:00
Elliott Hughes
9f10e6a96a am 70e0bd3a: Merge "Rename the tzdata update tool, and add HTTP support."
* commit '70e0bd3a448fc345d75d16caf40babf36463f0ec':
  Rename the tzdata update tool, and add HTTP support.
2013-04-22 11:34:48 -07:00
Elliott Hughes
2379088a90 Upgrade to tzdata2013c.
From the release notes:

  Changes affecting current and future time stamps:

    Palestine observed DST starting March 29, 2013.  (Thanks to
    Steffen Thorsen.)  From 2013 on, Gaza and Hebron both observe DST,
    with the predicted rules being the last Thursday in March at 24:00
    to the first Friday on or after September 21 at 01:00.

    Assume that the recent change to Paraguay's DST rules is permanent,
    by moving the end of DST to the 4th Sunday in March every year.
    (Thanks to Carlos Raúl Perasso.)

  Changes affecting past time stamps:

    Fix some historical data for Palestine to agree with that of
    timeanddate.com, as follows:

          The spring 2008 change in Gaza and Hebron was on 00:00 Mar 28, not
          00:00 Apr 1.

          The fall 2009 change in Gaza and Hebron on Sep 4 was at 01:00, not
          02:00.

          The spring 2010 change in Hebron was 00:00 Mar 26, not 00:01 Mar 27.

          The spring 2011 change in Gaza was 00:01 Apr 1, not 12:01 Apr 2.

          The spring 2011 change in Hebron on Apr 1 was at 00:01, not 12:01.

          The fall 2011 change in Hebron on Sep 30 was at 00:00, not 03:00.

    Fix times of habitation for Macquarie to agree with the Tasmania
    Parks & Wildlife Service history, which indicates that permanent
    habitation was 1899-1919 and 1948 on.

  Changing affecting metadata only:

    Macquarie Island is politically part of Australia, not Antarctica.
    (Thanks to Tobias Conradi.)

    Sort Macquarie more-consistently with other parts of Australia.
    (Thanks to Tim Parenti.)

Change-Id: I3df146d046eda26dbc6ce2a0a26ad9214ec4eaca
2013-04-22 11:33:14 -07:00
Elliott Hughes
70e0bd3a44 Merge "Rename the tzdata update tool, and add HTTP support." 2013-04-22 18:28:49 +00:00
Elliott Hughes
f8dff7d449 Rename the tzdata update tool, and add HTTP support.
The FTP server is currently unavailable, but the HTTP server is working
fine.

Change-Id: If7f2f396e89aca022a60af531f3604523b7bf95c
2013-04-22 11:11:43 -07:00
Elliott Hughes
d23a87d3b1 am 8c181aa8: Merge "Use hidden visibility for internal-use-only functions"
* commit '8c181aa8fe421c62a8e30f4c10e322aca968c27c':
  Use hidden visibility for internal-use-only functions
2013-04-15 11:24:14 -07:00
Elliott Hughes
8c181aa8fe Merge "Use hidden visibility for internal-use-only functions" 2013-04-15 17:51:24 +00:00
Christopher Ferris
39e4ed9699 am 516a8970: Merge "Rewrite memset for cortexa15 to use strd."
* commit '516a89705378f43646678e75924529404e52b613':
  Rewrite memset for cortexa15 to use strd.
2013-04-12 12:30:22 -07:00
Elliott Hughes
cf4a53020d am b3c8c4d8: Merge "Switch to current FreeBSD qsort."
* commit 'b3c8c4d8654894cdc72d32bde84a520ccda4d8f3':
  Switch to current FreeBSD qsort.
2013-04-12 12:30:22 -07:00
Christopher Ferris
516a897053 Merge "Rewrite memset for cortexa15 to use strd." 2013-04-12 19:16:44 +00:00
Elliott Hughes
b3c8c4d865 Merge "Switch to current FreeBSD qsort." 2013-04-12 19:12:29 +00:00
Christopher Ferris
796cbe249b Rewrite memset for cortexa15 to use strd.
Merge from internal master.

(cherry-picked from commit 7ffad9c120)

Change-Id: Ia67f2a545399f4fa37b63d5634a3565e4f5482f9
2013-04-12 10:58:25 -07:00
Kito Cheng
ea489745dc Use hidden visibility for internal-use-only functions
- malloc_debug_init and malloc_debug_fini

Change-Id: I4261ff428a50d8f0371415cda71bcc0a9487ce67
2013-04-12 16:34:38 +08:00
Elliott Hughes
0b25f633a2 Switch to current FreeBSD qsort.
Change-Id: Ic46cd0b663dc5fa78c99dd38db0bfe849a25e789
2013-04-11 18:08:34 -07:00
Elliott Hughes
5fe62e50f6 am ed36d95f: Merge "Start moving to current FreeBSD stdio."
* commit 'ed36d95fac5881f78a601e2932f51edfd27c6ba6':
  Start moving to current FreeBSD stdio.
2013-04-11 14:24:37 -07:00
Elliott Hughes
ed36d95fac Merge "Start moving to current FreeBSD stdio." 2013-04-11 21:18:14 +00:00
Elliott Hughes
6b05c8e280 Start moving to current FreeBSD stdio.
This only touches the easy stuff.

Change-Id: Iecee57f1681dba5c56bff59f0e9a89811a71f0ca
2013-04-11 13:55:01 -07:00