Hello community,

here is the log from the commit of package android-tools.2784 for 
openSUSE:12.3:Update checked in at 2014-05-13 15:57:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/android-tools.2784 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.android-tools.2784.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "android-tools.2784"

Changes:
--------
New Changes file:

--- /dev/null   2014-04-28 00:21:37.460033756 +0200
+++ 
/work/SRC/openSUSE:12.3:Update/.android-tools.2784.new/android-tools.changes    
    2014-05-13 15:57:16.000000000 +0200
@@ -0,0 +1,26 @@
+-------------------------------------------------------------------
+Fri May  2 20:12:27 UTC 2014 - [email protected]
+
+- Fix overflow in adb CVE-2014-1909 [bnc#863074]
+  * fix-overflow-in-adb_client.patch
+
+-------------------------------------------------------------------
+Mon Jan 28 00:18:10 UTC 2013 - [email protected]
+
+- fix wrong types for ppc64 (android-tools-ppc64-types.patch) 
+
+-------------------------------------------------------------------
+Wed Jan 16 13:36:36 UTC 2013 - [email protected]
+
+- Move udev rules to correct place
+
+-------------------------------------------------------------------
+Wed Jan 16 12:23:33 UTC 2013 - [email protected]
+
+- Fix udev rules
+
+-------------------------------------------------------------------
+Fri Dec  7 16:02:37 UTC 2012 - [email protected]
+
+- Initial package
+- Version 4.2.1_r1

New:
----
  51-android.rules
  adb-Makefile
  android-tools-ppc64-types.patch
  android-tools.changes
  android-tools.spec
  core-4.2.1_r1.tar.bz2
  core-Makefile
  extras-4.2.1_r1.tar.bz2
  fastboot-Makefile
  fix-overflow-in-adb_client.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ android-tools.spec ++++++
#
# spec file for package android-tools
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           android-tools
Version:        4.2.1_r1
Release:        0
Summary:        Android platform tools (adb, fastboot)
License:        Apache-2.0 and BSD-3-Clause
Group:          Hardware/Mobile
Url:            http://developer.android.com/guide/developing/tools/
# git clone https://android.googlesource.com/platform/system/core.git && cd core
# git archive android-%{version} --prefix=core-%{version}/ adb fastboot 
libzipfile libcutils libmincrypt libsparse mkbootimg include/cutils 
include/zipfile include/mincrypt | bzip2 > ../core-%{version}.tar.bz2
#
# git clone https://android.googlesource.com/platform/system/extras.git && cd 
extras
# git archive android-%{version} --prefix=extras/ ext4_utils | bzip2 > 
../extras-%{version}.tar.bz2
Source0:        core-%{version}.tar.bz2
Source1:        extras-%{version}.tar.bz2
Source2:        core-Makefile
Source3:        adb-Makefile
Source4:        fastboot-Makefile
Source5:        51-android.rules
Patch0:         android-tools-ppc64-types.patch 
Patch1:         fix-overflow-in-adb_client.patch

BuildRequires:  libselinux-devel
BuildRequires:  openssl-devel
BuildRequires:  udev
BuildRequires:  zlib-devel
Requires:       udev

Provides:       adb
Provides:       fastboot

%if %( echo `rpm -q --queryformat %%{version} udev` ) > 190
%define _udevprefix /usr/lib
%else
%define _udevprefix /lib
%endif

%description
Android Debug Bridge (adb) is a command-line tool used to communicate with and 
control
Android device over a USB link from a computer. Fastboot is a command line tool 
used
to directly flash the filesystem in Android devices from a host via USB.

%prep
%setup -q -b 1 -n extras
%patch0 -p1
%setup -q -b 0 -n core-%{version}
cp -p %{SOURCE2} Makefile
cp -p %{SOURCE3} adb/Makefile
cp -p %{SOURCE4} fastboot/Makefile
%patch1 -p1

%build
make %{?_smp_mflags}

%install
install -d -m 0755 %{buildroot}%{_bindir}
install -D -m 0644 %{SOURCE5} 
%{buildroot}%{_udevprefix}/udev/rules.d/51-android.rules
%make_install DESTDIR=%{buildroot} BINDIR=%{_bindir}

%files
%defattr(-,root,root)
%doc adb/OVERVIEW.TXT adb/SERVICES.TXT adb/NOTICE adb/protocol.txt
%{_bindir}/adb
%{_bindir}/fastboot
%{_udevprefix}/udev/rules.d/51-android.rules

%changelog
++++++ 51-android.rules ++++++
# http://developer.android.com/guide/developing/device.html
# adb/usb_vendors.c

# Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0660", GROUP="users"

# Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0660", GROUP="users"

# Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0660", GROUP="users"

# Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0660", GROUP="users"

# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0660", GROUP="users"

# HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0660", GROUP="users"

# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0660", GROUP="users"

# Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0660", GROUP="users"

# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0660", GROUP="users"

# Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0660", GROUP="users"

# Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0660", GROUP="users"

# Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0660", GROUP="users"

# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0660", GROUP="users"

# Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0660", GROUP="users"

# Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0660", GROUP="users"

# ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0660", GROUP="users"

# Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0660", GROUP="users"

# On-The-Go-Video
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0660", GROUP="users"

# NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0660", GROUP="users"

# Panasonic
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0660", GROUP="users"

# Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0660", GROUP="users"

# SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0660", GROUP="users"

# KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0660", GROUP="users"

# ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0660", GROUP="users"

# Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0660", GROUP="users"

# Texas Instruments
SUBSYSTEM=="usb", ATTR{idVendor}=="0451", MODE="0660", GROUP="users"

# Funai
SUBSYSTEM=="usb", ATTR{idVendor}=="0f1c", MODE="0660", GROUP="users"

# Gigabyte
SUBSYSTEM=="usb", ATTR{idVendor}=="0414", MODE="0660", GROUP="users"

# IRiver
SUBSYSTEM=="usb", ATTR{idVendor}=="2420", MODE="0660", GROUP="users"

# Compal
SUBSYSTEM=="usb", ATTR{idVendor}=="1219", MODE="0660", GROUP="users"

# T & A Mobile Phones
SUBSYSTEM=="usb", ATTR{idVendor}=="1bbb", MODE="0660", GROUP="users"

# LenovoMobile
SUBSYSTEM=="usb", ATTR{idVendor}=="2006", MODE="0660", GROUP="users"

# Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0660", GROUP="users"

# Vizio
SUBSYSTEM=="usb", ATTR{idVendor}=="e040", MODE="0660", GROUP="users"

# K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0660", GROUP="users"

# Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0660", GROUP="users"

# Archos
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0660", GROUP="users"

# Positivo
SUBSYSTEM=="usb", ATTR{idVendor}=="1662", MODE="0660", GROUP="users"

# Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0660", GROUP="users"

# Quanta
SUBSYSTEM=="usb", ATTR{idVendor}=="0408", MODE="0660", GROUP="users"

# INQ Mobile
SUBSYSTEM=="usb", ATTR{idVendor}=="2314", MODE="0660", GROUP="users"

# Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0660", GROUP="users"

# Lab126
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", MODE="0660", GROUP="users"

# Yulong Coolpad
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0660", GROUP="users"

# Kobo
SUBSYSTEM=="usb", ATTR{idVendor}=="2237", MODE="0660", GROUP="users"

# Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0660", GROUP="users"

++++++ adb-Makefile ++++++
SRCS+= adb.c
SRCS+= adb_client.c
SRCS+= adb_auth_host.c
SRCS+= commandline.c
SRCS+= console.c
SRCS+= file_sync_client.c
SRCS+= fdevent.c
SRCS+= get_my_path_linux.c
SRCS+= services.c
SRCS+= sockets.c
SRCS+= transport.c
SRCS+= transport_local.c
SRCS+= transport_usb.c
SRCS+= usb_linux.c
SRCS+= usb_vendors.c
SRCS+= utils.c

VPATH+= ../libcutils
SRCS+= abort_socket.c
SRCS+= socket_inaddr_any_server.c
SRCS+= socket_local_client.c
SRCS+= socket_local_server.c
SRCS+= socket_loopback_client.c
SRCS+= socket_loopback_server.c
SRCS+= socket_network_client.c
SRCS+= load_file.c
SRCS+= list.c

VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c

VPATH+= ../libmincrypt
SRCS+= rsa.c
SRCS+= rsa_e_3.c
SRCS+= rsa_e_f4.c
SRCS+= sha.c

CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -I../include

CFLAGS+= $(RPM_OPT_FLAGS)
LIBS= -lrt -lpthread -lz -lcrypto

CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc

OBJS= $(SRCS:.c=.o)

all: adb

adb: $(OBJS)
        $(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)

install: adb
        install adb $(DESTDIR)$(BINDIR)

clean:
        rm -rf $(OBJS)
++++++ android-tools-ppc64-types.patch ++++++
Index: extras/ext4_utils/ext4_utils.c
===================================================================
--- extras.orig/ext4_utils/ext4_utils.c
+++ extras/ext4_utils/ext4_utils.c
@@ -402,8 +402,8 @@ u64 get_file_size(int fd)
 {
        struct stat buf;
        int ret;
-       u64 reserve_len = 0;
-       s64 computed_size;
+       __u64 reserve_len = 0;
+       __s64 computed_size;
 
        ret = fstat(fd, &buf);
        if (ret)
Index: extras/ext4_utils/ext4_utils.h
===================================================================
--- extras.orig/ext4_utils/ext4_utils.h
+++ extras/ext4_utils/ext4_utils.h
@@ -84,8 +84,13 @@ extern int force;
 #define __u16 u16
 #define __u8 u8
 
+#if defined(__powerpc64__)
+typedef unsigned long u64;
+typedef signed long s64;
+#else
 typedef unsigned long long u64;
 typedef signed long long s64;
+#endif
 typedef unsigned int u32;
 typedef unsigned short int u16;
 typedef unsigned char u8;
++++++ core-Makefile ++++++
all:
        $(MAKE) -C adb all
        $(MAKE) -C fastboot all

install:
        $(MAKE) -C adb install
        $(MAKE) -C fastboot install

clean:
        $(MAKE) -C adb clean
        $(MAKE) -C fastboot clean
++++++ fastboot-Makefile ++++++
SRCS+= protocol.c
SRCS+= engine.c
SRCS+= bootimg.c
SRCS+= fastboot.c
SRCS+= usb_linux.c
SRCS+= util_linux.c

VPATH+= ../libzipfile
SRCS+= centraldir.c
SRCS+= zipfile.c

VPATH+= ../libsparse
SRCS+= backed_block.c
SRCS+= output_file.c
SRCS+= sparse.c
SRCS+= sparse_crc32.c
SRCS+= sparse_err.c
SRCS+= sparse_read.c

VPATH+= ../../extras/ext4_utils
SRCS+= allocate.c
SRCS+= contents.c
SRCS+= ext4_utils.c
SRCS+= extent.c
SRCS+= indirect.c
SRCS+= make_ext4fs.c
SRCS+= sha1.c
SRCS+= uuid.c
SRCS+= wipe.c

CPPFLAGS+= -DADB_HOST=1
CPPFLAGS+= -DHAVE_FORKEXEC=1
CPPFLAGS+= -DHAVE_SYMLINKS
CPPFLAGS+= -DHAVE_TERMIO_H
CPPFLAGS+= -D_GNU_SOURCE
CPPFLAGS+= -D_XOPEN_SOURCE
CPPFLAGS+= -I.
CPPFLAGS+= -I../include
CPPFLAGS+= -I../libsparse/include
CPPFLAGS+= -I../mkbootimg
CPPFLAGS+= -I../../extras/ext4_utils

CFLAGS+= $(RPM_OPT_FLAGS)
LIBS= -lrt -lpthread -lz -lselinux

CC= $(TOOLCHAIN)gcc
LD= $(TOOLCHAIN)gcc

OBJS= $(SRCS:.c=.o)

all: fastboot

fastboot: $(OBJS)
        $(LD) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)

install: fastboot
        install fastboot $(DESTDIR)$(BINDIR)

clean:
        rm -rf $(OBJS)
++++++ fix-overflow-in-adb_client.patch ++++++
>From 75e0645921cb6c3e9d33672733372f519bf57f38 Mon Sep 17 00:00:00 2001
From: Nick Kralevich <[email protected]>
Date: Tue, 10 Dec 2013 10:18:10 -0800
Subject: [PATCH] Fix overflow in adb_client

Credit: Joshua Drake
Bug: 12060953

(cherry picked from commit e89e09dd2b9b42184973e3ade291186a2737bced)

Change-Id: I8a9b2592a5e4f7527c607abfe4ea6df6eb550aa8
---
 adb/adb_client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/adb/adb_client.c b/adb/adb_client.c
index f7823a8..586cd7b 100644
--- a/adb/adb_client.c
+++ b/adb/adb_client.c
@@ -241,7 +241,7 @@ int adb_connect(const char *service)
     } else {
         // if server was running, check its version to make sure it is not out 
of date
         char buf[100];
-        int n;
+        size_t n;
         int version = ADB_SERVER_VERSION - 1;
 
         // if we have a file descriptor, then parse version result
@@ -250,7 +250,7 @@ int adb_connect(const char *service)
 
             buf[4] = 0;
             n = strtoul(buf, 0, 16);
-            if(n > (int)sizeof(buf)) goto error;
+            if(n > sizeof(buf)) goto error;
             if(readx(fd, buf, n)) goto error;
             adb_close(fd);
 
-- 
1.8.4.5

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to