13 febrero 2008

Bug Kernel 2.6.17 a 2.6.24 vmsplice

Supongo que todos los que pasais por aquí visitais también Open-Eslack, pero como nunca está de más avisar sobre estos asuntos os informamos sobre una vulnerabilidad en los kernel de la serie 2.6 (de 6.17 a 6.24.1).

El bug permite a un usuario local sin privilegios escalar hasta convertirse en root.




El exploit se aprovecha de un fallo en la llamada al sistema vmsplice(), por que omite un par de validaciones de permisos. +info

Kernels no afectados: 2.6.22.8 o 2.6.23.16 o 2.6.24.2

La soluciónes que tenemos q adoptar serían:
- Parchear nuestro kernel. [Probado]
- Actualizar a uno no afectado. [Probado]
- Compilar el kernel sin soporte vmsplice. [No probado]
- Ejecutar el módulo novmsplice, para desabilitar las llamadas al sistema vmsplice. [No probado]

29 enero 2008

Instalando kde 3.5.8

Descargamos los siguientes paquetes:


Salimos del kde si estuviesemos ahí:

Menu K -> Temirnar -> Terminar sesion #Recomiendo además salir a una terminal tty1, por ejemplo, Ctrl + Alt + F1
telinit 3 #Descargamos el servidor X (por si las moscas)

Vía 1: borramos los paquetes de versiones anteriores:

cd /var/log/packages
removepkg xxxxx#usamos autocompletar para que la tarea nos resulte mas comoda


Podemos además borrar la antigua configuración del kde

rm -rf $HOME/.kde

Y finalmente instalamos los paquetes descargados, podemos reiniciar el equipo antes de instalar (metodo: scottie), o instalar directamente (metodo: aks), los dos metodos tuvieron un final feliz:

(reboot)
installpkg *.tgz #así si nos situamos desde la carpeta que los contenga


Vía 2: Desde la carpeta que contiene los tgz del kde 3.5.8 actualizamos directamente los paquetes.

upgradepkg *.tgz #testeado por washap :·O

Tras la instalación:

telinit 4 o startx

y a disfrutar del kde 3.5.8
Paquetes descargado de:
Belnet.be
Slacky.eu

Compilando tu propio Kernel serie 2.6

Compilar nuestro propio kernel nos puede traer bastantes ventajas, y no es necesario esperar a que aparezca una versión precompilada.

Procedo al mini-howto partiendo de la configuración de nuestro kernel previo, siempre podemos configurarlo a nuestro gusto y a nuestras necesidades pero no es el cometido de este manual.

Descargamos el codigo completo de la versión del kernel a compilar, en este caso 2.6.24, y lo descomprimimos.

wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2
tar xvf linux-2.6.24.tar.bz2


Pasamos nuestra la carpeta del codigo fuente del kernel a /usr/src

mv linux-2.6.24 /usr/src/linux-2.6.24

Vamos hasta el directorio y copiamos la configuración de nuestro kernel previo (2.6.23.8 en mi caso)

cd /usr/src
cp linux-2.6.23.8/.config /usr/src/linux-2.6.24
cd linux-2.6.24


Ahora podemos comprobar los modulos que se cargarán en el kernel, y marcar o desmarcar los que se nos antoje mediante make menuconfig o make xconfig.

y despues compilamos el código e instalamos los modulos

make && make modules && make modules_install

Copiamos la imagen del kernel a nuestro directorio /boot y preparamos una nueva entrada en el lilo.conf para arrancar con él.

cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.24

Añadimos al /etc/lilo.conf

image = /boot/vmlinuz-2.6.24
root = /dev/sda2 #La particion que corresponda
label = 2.6.24
read-only

Reescribimos el mbr

/sbin/lilo -v

Y al reiniciar tendremos disponible nuestra nueva entrada para cargar el nuevo kernel.

13 enero 2008

Kde 4.0.0 en slackware 12 + upgrade 4.0.1

Bajamos de esta página:

http://www.mytux.org/content/viewslackpackage.php

Los siguientes paquetes:

extragear-plasma-4.0.0-i486-1mg.tgz
capseo-0108svn-i486-1mg.tgz
kdeadmin-4.0.0-i486-1mg.tgz
kdeartwork-4.0.0-i486-1mg.tgz
kdebase-4.0.0-i486-2mg.tgz
kdegames-4.0.0-i486-1mg.tgz
kdegraphics-4.0.0-i486-1mg.tgz
kdelibs-4.0.0-i486-1mg.tgz
kdemultimedia-4.0.0-i486-1mg.tgz
kdenetwork-4.0.0-i486-1mg.tgz
kdepim-4.0.0svn-i486-1mg.tgz
kdepimlibs-4.0.0-i486-1mg.tgz
kdesdk-4.0.0-i486-1mg.tgz
kdeutils-4.0.0-i486-1mg.tgz
kdewebdev-4.0.0-i486-1mg.tgz
libcaptury-0108svn-i486-1mg.tgz
qimageblitz-0108svn-i486-1mg.tgz
strigi-0108svn-i486-1mg.tgz
tapioca-qt-0.14.1-i486-2mg.tgz
telepathy-qt-0.14.1-i486-1mg.tgz
libiconv-1.12-i486-1as.tgz
qt4-4.3.3-i686-1as.tgz
pyqt4-4.3.3-i486-1as.tgz
sip-4.7.3-i486-1as.tgz
postgresql-8.2.6-i486-1sl.tgz
unixodbc-2.2.12-i486-1sl.tgz
sqlite-3.5.4-i486-1sl.tgz
kdebase-runtime-4.0.0-i486-1mg.tgz
kdebase-workspace-4.0.0-i486-1mg.tgz
soprano-0801svn-i486-1mg.tgz
decibel-0108svn-i486-1mg.tgz

Los instalais y ahora toca configurar las qt para que no de problemas al arrancar kde 4.0.
El script funciona de la siguiente forma:

./nombrescript.sh [qt3qt4]

Dependiendo de las qt que nos interese tener, en este caso qt4, porque sino tendremos problemas al iniciarlo.

Creais un script con el siguiente contenido:

#!/bin/sh
#very simple script for switch qt version

qt3()
{
sudo rm /usr/lib/qt
sudo ln -s /usr/lib/qt-3.3.8 /usr/lib/qt
sudo rm /usr/bin/qmake
sudo ln -s /usr/lib/qt/bin/qmake /usr/bin/qmake
echo "Now use qt3"
}

qt4()
{
sudo rm /usr/lib/qt
sudo ln -s /opt/qt4 /usr/lib/qt
sudo rm /usr/bin/qmake
sudo ln -s /opt/qt4/bin/qmake /usr/bin/qmake
echo "Now use qt4"
}

case "$1" in
'qt3')
qt3
;;
'qt4')
qt4
;;
*)
echo "usage $0 qt3qt4"
esac

Y con esto es suficiente para que cuando vayais a kdm y selecioneis kde4 arranque con normalidad.

Información sacada de: http://www.mytux.org/ y de su foro, slacky.eu y aportes de eslackeros como dhabyx.

==
Actualización a KDE 4.0.1

Descargamos los siguientes paquetes:

KdeLibs
Qimageblitz
Strigi
Kdebase
KdeGames
KdeGraphics
KdeUtils
KdeNetwork
KdeMultimedia
Extragear-Plasma
KdeWebdev
KdeAdmin
KdePimLibs
Soprano
KdeAccesibility
KdeToys

$ upgradepkg *.tgz #aún sin probar

11 enero 2008

Control vía Bluetooth de Amarok (Remuco)

Hace tiempo me planteé la posibilidad de manejar el equipo vía Bluetooth con el movil, y me lo propuse como proyecto a medio plazo, y hace poco encontré un programa remuco, que permite controlar el Amarok (Rhythmbox/Xmms) vía Bluetooth, y aquí adjunto un pequeño tutorial.

Requisitos iniciales:
- Bluetooth funcional en el equipo. (Actualizaré pronto el howto para Slack 12.0).
- Movil con soporte Java.

Descargamos el remuco-client e instalamos una de las distintas versiones en el teléfono. (Diferencias entre las versiones)

Descargamos el remuco-sever, (dependiendo del programa a controlar bajaraemos uno u otro), en nuestro caso bajaremos remuco-server-amarok-0.4.3.1.tar.gz.

$> tar xfvz remuco-server-amarok-0.4.3.1.tar.gz
$> cd remuco-server-amarok-0.4.3.1
$> make install
ejecutamos
$> remuco-amarok
Iniciamos el Remuco cliente en el movil y ya podemos controlar nuestro reproductor de música vía bluetooth.

29 diciembre 2007

Hauppauge HVR900 en slackware 12

Descargamos el paquete mercurial:

http://packages.slackware.it/package.php?q=current/mercurial-0.9.4-i486-1

Despues descargamos el firmware para esta tarjeta

%cd /lib/firmware
%wget http://konstantin.filtschew.de/v4l-firmware/firmware_v3.tgz
%sudo tar xvzf firmware_v3.tgz


Despues vamos a necesitar el modulo dvb

hg clone http://mcentral.de/hg/~mrec/v4l-dvb-experimental

Para instalarlo:

%make && make install

Despues creamos este archivo en /etc/modprobe.d

%pico /etc/modprobe.d/hvr900


# Hauppage WinTV HVR 900 hybrid TV stick

# modo TDT
options em28xx device_mode=1

#Otra opcion sería
##install em28xx /sbin/modprobe --ignore-install em28xx; /bin/sleep 2; /sbin/modprobe em2880-dvb

# Dependencia de módulos
alias hvr900 em2880_dvb


Despues pinchamos el usb tv y hacemos un dmesg

si va todo bien vereis algo asi:

Linux video capture interface: v2.00
em28xx v4l2 driver version 0.0.1 loaded
em28xx new video device (2040:6502): interface 0, class 255
em28xx: device is attached to a USB 2.0 bus
em28xx: you're using the experimental/unstable tree from mcentral.de
em28xx: there's also a stable tree available but which is limited to
em28xx: linux <=2.6.19.2 em28xx: it's fine to use this driver but keep in mind that it will move em28xx: to http://mcentral.de/hg/~mrec/v4l-dvb-kernel as soon as it's em28xx: proved to be stable em28xx #0: Alternate settings: 8 em28xx #0: Alternate setting 0, max size= 0 em28xx #0: Alternate setting 1, max size= 0 em28xx #0: Alternate setting 2, max size= 1448 em28xx #0: Alternate setting 3, max size= 2048 em28xx #0: Alternate setting 4, max size= 2304 em28xx #0: Alternate setting 5, max size= 2580 em28xx #0: Alternate setting 6, max size= 2892 em28xx #0: Alternate setting 7, max size= 3072 attach_inform: eeprom detected. em28xx #0: i2c eeprom 00: 1a eb 67 95 40 20 02 65 d0 12 5c 03 82 1e 6a 18 em28xx #0: i2c eeprom 10: 00 00 24 57 66 07 01 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 20: 46 00 01 00 f0 10 02 00 b8 00 00 00 5b e0 00 00 em28xx #0: i2c eeprom 30: 00 00 20 40 20 6e 02 20 10 01 01 01 00 00 00 00 em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 18 03 34 00 30 00 em28xx #0: i2c eeprom 70: 32 00 38 00 35 00 33 00 38 00 31 00 36 00 34 00 em28xx #0: i2c eeprom 80: 00 00 1e 03 57 00 69 00 6e 00 54 00 56 00 20 00 em28xx #0: i2c eeprom 90: 48 00 56 00 52 00 2d 00 39 00 30 00 30 00 00 00 em28xx #0: i2c eeprom a0: 84 12 00 00 05 50 1a 7f d4 78 23 fa fd d0 28 89 em28xx #0: i2c eeprom b0: ff 00 00 00 04 84 0a 00 01 01 20 77 00 40 34 9d em28xx #0: i2c eeprom c0: 1e f0 74 02 01 00 01 79 5b 00 00 00 00 00 00 00 em28xx #0: i2c eeprom d0: 84 12 00 00 05 50 1a 7f d4 78 23 fa fd d0 28 89 em28xx #0: i2c eeprom e0: ff 00 00 00 04 84 0a 00 01 01 20 77 00 40 34 9d em28xx #0: i2c eeprom f0: 1e f0 74 02 01 00 01 79 5b 00 00 00 00 00 00 00 EEPROM ID= 0x9567eb1a Vendor/Product ID= 2040:6502 AC97 audio (5 sample rates) 500mA max power Table at 0x24, strings=0x1e82, 0x186a, 0x0000 tveeprom 4-0050: Hauppauge model 65018, rev B2C0, serial# 2006324 tveeprom 4-0050: tuner model is Xceive XC3028 (idx 120, type 71) tveeprom 4-0050: TV standards PAL(B/G) PAL(I) PAL(D/D1/K) ATSC/DVB Digital (eeprom 0xd4) tveeprom 4-0050: audio processor is None (idx 0) tveeprom 4-0050: has radio setting new tuner type now 71! tuner 4-0061: chip found @ 0xc2 (em28xx #0) attach inform (default): detected I2C address c2 /root/v4l-dvb-experimental/v4l/tuner-core.c: setting tuner callback tuner 0x61: Configuration acknowledged /root/v4l-dvb-experimental/v4l/tuner-core.c: setting tuner callback /root/v4l-dvb-experimental/v4l/xc3028-tuner.c: attach request! /root/v4l-dvb-experimental/v4l/tuner-core.c: xc3028 tuner successfully loaded attach_inform: tvp5150 detected. tvp5150 4-005c: tvp5150am1 detected. Loading base firmware: xc3028_init0.i2c.fw Loading default analogue TV settings: xc3028_BG_PAL_A2_A.i2c.fw xc3028-tuner.c: firmware 2.7 ANALOG TV REQUEST em28xx #0: V4L2 VBI device registered as /dev/vbi0 em28xx #0: V4L2 device registered as /dev/video0 em28xx #0: Found Hauppauge WinTV HVR Rev. 1.2 usbcore: registered new interface driver em28xx em28xx-audio.c: probing for em28x1 non standard usbaudio em28xx-audio.c: Copyright (C) 2006 Markus Rechberger Em28xx: Initialized (Em28xx Audio Extension) extension usb 3-1: new low speed USB device using uhci_hcd and address 2 usb 3-1: configuration #1 chosen from 1 choice input: USB Mouse as /class/input/input7 input: USB HID v1.10 Mouse [USB Mouse ] on usb-0000:00:1a.0-1


Si teneis problemas con el sonido probad con este scripts:

#!/bin/sh
/usr/bin/tvtime &
/bin/sleep 3
#/usr/bin/sox -r 48000 -w -c 2 -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp
/usr/bin/sox -r 11000 -w -c 2 -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp
#/usr/bin/sox -r 22000 -w -c 2 -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp


Información sacada de:

Manual ubuntu
http://caligari.treboada.net/ubuntu_tdt

Página del producto:
http://www.hauppauge.co.uk/pages/products/data_hvr900.html

Driver Em2880 en V4Lwiki:
http://www.linuxtv.org/v4lwiki/index.php/Em2880

FAQ sobre Em2880:
http://linuxtv.org/v4lwiki/index.php/Talk:Em2880

Información en inglés:
http://lunapark6.com/usb-hdtv-tuner-stick-for-windows-linux-hauppauge-wintv-hvr-950.html

Chicony USB 2.0 Camera

Bajamos este driver

%svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk


%make && make install

%modprobe uvcvideo


y ya tenemos webcam