資訊聯播

DSA-2035 apache2 - multiple issues

最新 Debian 安全通告 - 2010, 四月 17 - 00:00

Two issues have been found in the Apache HTTPD web server:

DSA-2034 phpmyadmin - several vulnerabilities

最新 Debian 安全通告 - 2010, 四月 17 - 00:00

Several vulnerabilities have been discovered in phpMyAdmin, a tool to administer MySQL over the web. The Common Vulnerabilities and Exposures project identifies the following problems:

DSA-2033 ejabberd - heap overflow

最新 Debian 安全通告 - 2010, 四月 15 - 00:00

It was discovered that in ejabberd, a distributed XMPP/Jabber server written in Erlang, a problem in ejabberd_c2s.erl allows remote authenticated users to cause a denial of service by sending a large number of c2s (client2server) messages; that triggers an overload of the queue, which in turn causes a crash of the ejabberd daemon.

DSA-2032 libpng - several vulnerabilities

最新 Debian 安全通告 - 2010, 四月 11 - 00:00

Several vulnerabilities have been discovered in libpng, a library for reading and writing PNG files. The Common Vulnerabilities and Exposures project identifies the following problems:

DSA-2031 krb5 - use-after-free

最新 Debian 安全通告 - 2010, 四月 11 - 00:00

Sol Jerome discovered that kadmind service in krb5, a system for authenticating users and services on a network, allows remote authenticated users to cause a denial of service (daemon crash) via a request from a kadmin client that sends an invalid API version number.

Vern: getPY

Planet DebianHK - 2009, 十二月 14 - 10:44
FROM: https://groups.google.com/group/binsos/browse_thread/thread/1951b77a2cf4bfab

def getPY(s):
try: chr=s.encode("GB18030")
except: return s
if chr<"\xb0\xa1": return s
if chr>"\xd7\xf9": return u"?"
if chr<"\xb0\xc5": return u"a"
if chr<"\xb2\xc1": return u"b"
if chr<"\xb4\xee": return u"c"
if chr<"\xb6\xea": return u"d"
if chr<"\xb7\xa2": return u"e"
if chr<"\xb8\xc1": return u"f"
if chr<"\xb9\xfe": return u"g"
if chr<"\xbb\xf7": return u"h"
if chr<"\xbf\xa6": return u"j"
if chr<"\xc0\xac": return u"k"
if chr<"\xc2\xe8": return u"l"
if chr<"\xc4\xc3": return u"m"
if chr<"\xc5\xb6": return u"n"
if chr<"\xc5\xbe": return u"o"
if chr<"\xc6\xda": return u"p"
if chr<"\xc8\xbb": return u"q"
if chr<"\xc8\xf6": return u"r"
if chr<"\xcb\xfa": return u"s"
if chr<"\xcd\xda": return u"t"
if chr<"\xce\xf4": return u"w"
if chr<"\xd1\xb9": return u"x"
if chr<"\xd4\xd1": return u"y"
if chr<"\xd7\xfa": return u"z"
return s

來醫: “民主”黨

Planet DebianHK - 2009, 十二月 13 - 22:11

一個唔相信民主嘅所謂”民主黨”今日自己宣佈咗佢自己嘅末日!!

Sam Tang: Google Public DNS Servers 開放使用

Planet DebianHK - 2009, 十二月 11 - 12:14

上星期 Google 開放了類似 OpenDNS 的 DNS服務,以下是 DNS 的 IP:

8.8.8.8
8.8.4.4

在 Linux 下如果要改用 Google 的 DNS,只要修改 /etc/resolv.conf 檔案,將原本使用的 DNS 改成以下即可:

nameserver 8.8.8.8
nameserver 8.8.4.4

可能是因為 Google 的用戶群龐大,其 DNS 內的 cache 也較豐富,所以很多時瀏覽網站時,感覺 resolve 的時間也很快,比自己 ISP 的反應更佳。但大家要留意,當使用 Google 的 DNS 時,實際上上網的紀錄 Google 也可以知道,關心私穩方面問題的朋友要留意了。

Vern: vim tips

Planet DebianHK - 2009, 十二月 8 - 20:33
FROM: http://ryanlee.wikidot.com/vim:tips

`. '.  jump to last modification line
gf    open file name under cursor

gv    reselect-Visual
gi    jump to the last cursor when Insert mode was stopped

Alan Knowles: RooJs Appbuilder preview

Planet DebianHK - 2009, 十一月 14 - 15:30
Well, a peek into the secret world of Roo development. I've been a bit frustrated with the speed of development of the applications recently, so I decided to speed it up a bit..

Below is  a little video of a module I've added to the Iconstruction framework (which might get released one day..) - which enables me to very rapidly build applications.

The knock on effect of developing the builder has been that there is now far better support for xtype object constructors in Roo, along with far more acurate and complete documenation (as the builder tool needs that to work)

Sam Tang: MySQL 微調技巧

Planet DebianHK - 2009, 十一月 6 - 20:56

以下會介紹一些簡易的 MySQL 效能微調技巧,這些方法都是透過 my.cnf 的參數完成,而不需要重新編譯 MySQL。

Key Buffer
key buffer 是系統索引可用的緩存空間大小,對處理索引有很大的影響。設定 key buffer 的大小要根據自己的需要而定,而一個較簡單的方法是使用 25% 的記憶體空間作為 key buffer 使用。如果是獨立的資料庫伺服器可考慮使用更大的空間,例如 50%。
通這設定 key buffer 的大小,可以減少硬碟 I/O 操作對 MySQL 的影響。

以下是 key buffer 在 my.cnf 的設定方法:

key_buffer = 512M

Query Cache
這是 SQL Query 的緩存,將 query 的查詢結果暫存在記憶體裡面,直至資料被更新為止。

query_cache_size = 128MB
query_cache_limit = 4MB

Table Cache
對於同時要存取多個資料表十分重要,這是設定同時可開啟資料表的數目。

table_cache = 512

Sort Buffers
sort_buffer_size (在舊版本是 sort_buffer) 是設定 grouping 及 sorting 的緩存。

sort_buffer_size = 32M
myisam_sort_buffer_size = 32M

Vern: scrubbed

Planet DebianHK - 2009, 十一月 3 - 22:16
Nov 03 13:55:55.152 [warn] Failed to find node for hop 0 of our path. Discarding this circuit.
Nov 03 13:55:56.156 [warn] Failed to find node for hop 0 of our path. Discarding this circuit.
Nov 03 13:55:57.160 [warn] Failed to find node for hop 0 of our path. Discarding this circuit.
...
Nov 03 14:00:37.163 [notice] Tried for 120 seconds to get a connection to [scrubbed]:80. Giving up. (waiting for circuit)
Nov 03 14:00:37.163 [notice] Tried for 120 seconds to get a connection to [scrubbed]:443. Giving up. (waiting for circuit)
Nov 03 14:00:37.163 [notice] Tried for 120 seconds to get a connection to [scrubbed]:443. Giving up. (waiting for circuit)
Nov 03 14:00:37.163 [notice] Tried for 120 seconds to get a connection to [scrubbed]:80. Giving up. (waiting for circuit)
Nov 03 14:00:37.163 [notice] Tried for 120 seconds to get a connection to [scrubbed]:80. Giving up. (waiting for circuit)
...
Nov 03 14:08:20.727 [notice] no known bridge descriptors running yet; stalling
Nov 03 14:08:21.731 [notice] We now have enough directory information to build circuits.

Alan Knowles: Ubuntu release 9.10 a bit early

Planet DebianHK - 2009, 十月 30 - 07:46
Looks like ubuntu released karmic today (as I guess they could not rename it 9.11). 

I've been testing karmic for months, (which at times have been very painful - but if you join the beta ride, what else would it be), but in the last few weeks it looked like it was really coming together. 

The only big regression was the synaptics touchpad resetting the 'tap' setting after suspend resume cycle.

However, there was a kernel update last week which completely broke suspend (it never really sleeps the machine), and attempts to report it via the apport tool result in a invalid message about the kernel not being a ubuntu one.. (which someone has reported)

I'd really suggest anyone requiring resume/suspend to work, to hold of for a little while until they sort out the remaining issues.



Vern: QQ 内部版本号列表

Planet DebianHK - 2009, 十月 24 - 19:12
FROM: http://bbs.cyboma.com/viewthread.php?tid=10738&extra=&page=1

193F=【QQ2009 正式版 SP2 性能优化测试版】
190F=【QQ2009 正式版 SP4】
1909=【QQ2009 正式版 SP4 试用版】
1843=【QQ2009 正式版 SP2 传文件夹测试版】
1837=【QQ2009 正式版 SP3】
1831=【QQ2009 正式版 SP3 试用版】
175F=【QQ Internation Beta1】
1759=【QQ2009 正式版 SP2】
1753=【QQ2009 正式版 SP2 试用版】
1663=【QQ2009 正式版 SP1】
165D=【QQ2009 正式版 SP1 试用版】
1651=【QQ2009 正式版音视频优化版】
164A=【TM2009 Beta1.X系列】
1645=【QQ2009 正式版】
1644=【TM2009 Beta1】
163F=【QQ2009 正式试用版】
163A=【QQ for Mac 1.0 Beta1】
1621=【QQ2009 Beta2】
161B=【QQ2009 Beta2 试用版】
160F=【QQ2009 Beta1 传文件优化版】
1549=【QQ2009 Beta1】
1525=【QQ2009 Preview4】
1519=【QQ2009 Preview3 Build 431/450】
1513=【QQ2009 Preview3 界面优化版】
150D=【QQ2009 Preview3 音视频优化版】
1501=【QQ2009 Preview3】
1447=【QQ2009 Preview2 Build 107/118】
1441=【QQ2009 Preview2】
1440=【TM2008 Beta1】
143C=【QQ for Mac 1.0 Preview3】
141D=【QQ2009 Preview1】
141C=【TM2008 Preview4】
1418=【QQ for Mac 1.0 Preview2】
1412=【QQ for Mac 1.0 Preview1】
140F=【TM2008 Preview3】
140D=【TM2008 Preview2】
140B=【TM2008 Preview1】
1407=【QQ2007 蜂鸟 Alpha1 Demo】
1334=【QQ腾讯客户管理系统(CRM)】
1251=【QQ2008II Beta1 SP1】
1237=【QQ2008II Beta1】
1235=【QQ2008II Beta1 会员体验版】
1233=【QQ2008II Beta1 内测版】
1221=【QQ2008I 正式版】
121F=【QQ2008I 正式试用版】
120B=【QQ2008I Beta2】
1205=【QQ2008I Beta1 祈福版】
1203=【QQ2008I Beta1】
1201=【QQ2008I Beta1 会员体验版】
1163=【QQ2008I 视频优化特别版V2】
1161=【QQ2008I 视频优化特别版V1】
115B=【QQ2008I 贺岁版】
1156=【QQ for Linux 1.0 Preview1 Build 106】
114D=【QQ2007II 正式版 KB1】
114B=【QQ2007II 正式版】
1149=【QQ2007II 正式会员体验版】
1147=【QQ2007II 正式试用版】
1141=【QQ2007II Beta2 SP2】
113F=【QQ2007II Beta2 SP1】
113D=【QQ2007II Beta2】
1133=【QQ2007II Beta1】
1131=【QQ for Linux 1.0 Preview1】
111D=【QQ2007I 正式版 KB1】
111B=【QQ2007I 正式版】
1119=【QQ2007I 正式试用修正版】
1117=【QQ2007I 正式会员体验版】
1115=【QQ2007I 正式试用版】
1105=【QQ2007I Beta4 KB1】
1103=【QQ2007I Beta4】
1101=【QQ2007I Beta4 会员体验版】
1053=【QQ2007I Beta3 KB1】
1051=【QQ2007I Beta3】
1037=【QQ2007I Beta2 KB1】
1035=【QQ2007I Beta2】
1033=【QQ2007I Beta2 内测版】
1031=【QQ企业空间版】
1023=【QQ2007I Beta1 KB1】
1021=【QQ2007I Beta1 Support Vista】
101F=【QQ2007I Beta1】
0FFB=【QQ2006 正式版】
0FF1=【QQ2006 正式泄露版】
0F5F=【QQ2006 正式试用版】
0F39=【QQ2006 Beta2 繁体版 SP1】
0F32=【TM2007 Beta1 SP1】
0F30=【TM2007 Beta1 Support Vista】
0F2E=【TM2007 Beta1】
0F0C=【TM2006 新春版 Build 05E8】

pidgin QQ 插件(2008)使用的版本号

Vern: 如何在 Ubuntu下配置 TOR bridges

Planet DebianHK - 2009, 十月 24 - 18:25
FROM: http://vangie.bothlog.com/2009/09/27/%E5%9C%A8ubuntu%E4%B8%8Btor%E9%85%8D%E7%BD%AEbridges%E7%A9%BF%E5%A2%99/

Step1: 获取网桥地址

用你的gmail帐号发送主题和内容为"get bridges"的邮件至bridges@torproject.org

Step2: 配置Tor网桥

首先,备份原Tor配置文件torrc至备份目录:

sudo cp -p /etc/tor/torrc your-backup-directory

然后在torrc配置文件末尾添加"UseBridges 1"开关选项(默认是0, 即关闭状态),

UseBridges 1

UpdateBridgesFromAuthority 1

最后,将bridges@torproject.org回复邮件中的bridge列表附加至torrc配置文件末尾,请按回复邮件中的bridge的原有格式添加,即:

bridge ip:port fingerprint

上述两篇博客中谈到的邮件中有fingerprint字段,我收到的邮件中没有,但是测试后发现同样有效

Step3: 重启Tor和Privoxy

sudo /etc/init.d/tor restart
sudo /etc/init.d/privoxy restart

wanleung: First test post

Planet DebianHK - 2009, 十月 22 - 12:37

first post for test

wanleung: Flash ads, please make it stop

Planet DebianHK - 2009, 十月 16 - 14:37

I really fricking hate Flash. Not that you needed to be told this. It kind of looks nice when it works, except when it crashes your browser. It eats your CPU time and is buggy, there's a word we use to refer to software like that, it's 4 letters, starts in an s and ends in a t.

There's another reason not to like Flash though that's got less to do with the Flash program itself but more to do with how people use it. More than ever advertisers are using Flash to display animated or interactive advertising on webpages. That kind of nice in a way, I guess, because you can essentially build custom miniature apps in the advertising window. I do have a problem when advertising starts interfering with what I do. I mean, auto adverts with cars running across the screen? How about video adverts which pop up and plays automatically (with sound!) when you load a news site, or a sound-only advertising that plays in the background that has no stop button? I mean, really? Seriously, isn't that going too far? It's really distracting and really fricking annoying. I've always felt that advertising agencies have a general hate towards content consumers. I'll tell you the first thing I do when I see junk running across the screen or some video ad running just in the middle of when I'm reading the news, I tell the ad to f-off by clicking the "X" button in the corner (if there's one at all). Ads, sure, but not like this, thanks.

All thanks for a fairly prominent Sydney-based newspaper which recently started doing this and pushed me over the limit, I've now got Click to Flash installed in Safari. Now, Flash does not load automatically, it only loads when you click on the Flash window. Why don't browsers come with these things by default (by the way, Safari already has a checkbox which allows you to disable Flash), all browsers should have a "Webpage De-annoy-alizer" tab in the Preferences window that allows you to do things like this.

Alan Knowles: Speedier google translate API for RooJs and ExtJS

Planet DebianHK - 2009, 十月 14 - 07:01
If you have ever used googles translate API, it can quickly become a love hate relationship. You love the features it provides, but you begin to hate that fact that google's server are slow and flaky for loading the libraries that they recommend.

This situation was getting especially annoying yesterday, as the load time of my application (that is getting continually re-loaded while I'm working on it) was getting worse and worse, and google's API's was the culprit.

So after some further reading on that page, I realized that the translation call was really just a simple HTTP request with the correct parameters.. no need for huge google framework API etc.

So here's the ~20 line javascript to replace the slow loading 50k+ library that google recommends....

/**
* usage
* gtranslate('hello', 'en', 'es', function (res) {
* if (typeof(res) == 'object') { return; } // failure
* console.log(res); // success...
* });

*/

function gtranslate(str, src, dest, cb)
{
var x = new Roo.data.ScriptTagProxy({
url: 'http://ajax.googleapis.com/ajax/services/language/translate',
callbackParam : 'callback'
});
x.load(
{
v: '1.0',
q : str,
langpair : src + '|' +dest,
}, // end params.
{ // reader
readRecords : function (o) {
if (!o.responseData) {
return o;
}
return o.responseData.translatedText;
}
},
function (result) {
cb(result);
},
this,
[]
);


}



Vern: Maemo icon

Planet DebianHK - 2009, 十月 13 - 21:52
FROM: http://thpinfo.com/2008/02/maemo-icon-sizes.html

I had a hard time finding out which icon sizes one has to provide and
where to install them for Maemo applications (I'm currently developing
for OS2008 "chinook", might be different for other releases). Here is
what I found out by looking at the contents of other GUI packages:

26x26 icon goes to /usr/share/icons/26x26/hildon/appname.png
40x40 icon goes to /usr/share/icons/40x40/hilson/appname.png
64x64 icon goes to /usr/share/icons/scalable/hildon/appname.png

The 64x64 icon will be used in the menu, so be sure to make it really
64x64, otherwise the icon will look out of place in the menu. Also, be
sure to create an executable "postinst" file in the "debian/"
subdirectory of your package source that has at least the following
two commands:

gtk-update-icon-cache -f /usr/share/icons/hicolor
maemo-select-menu-location appname.desktop

Where of course "appname" is the name of your application and how you
named your icon and .desktop file.

wanleung: How NOT to write software

Planet DebianHK - 2009, 十月 3 - 21:46

The embedded routers available on the market these days are truly wonderful things. You buy one, it just works, you leave it there until there is a compelling reason to get a new one. Everybody is happy.

Oops! Just kidding! That's the way things ought to work, but it never days. Getting a router that works these days (perhaps with the exception of an Apple router, I guess) is largely a game of chance. Even doing due diligence by reading online reviews will not save you.

The particular one I have, a Dynalink RTA1046VW, which appears to be a rebadged Netcomm, does wireless and VOIP along with the usual Ethernet connection. The wireless would, however, fail every couple of days. It would just drop stone cold, and I'd have to reset it, but when I do the VOIP line would drop dead. This, gentle reader, in case you have not realized now, is very annoying. I thought the point of the wireless being there was so that you can use it?

Must be tough, writing router firmware, though I offer an alternative explanation. Maybe the hardware manufacturers of these routers simply do not give a damn about the quality of the software they stick inside these routers. A scary thought, millions of these devices powering the Intarwebs of the average Joe. Most of the time the poor quality manifests itself in things that won't work, like my wireless module. Sometimes they are a bit more egregious.

The particular router I have happens to run Linux. You don't find any mention of this or the fact that it uses GPL software, because it is not advertised as such. I am not a lawyer and do not know if you're required to acknowledge the fact that there's GPL software on the router, but for 10 bucks they do offer to send you a CD with source code on it.

I found it it ran Linux when I started poking around with the router when I wanted to find out whether there was some misconfiguration that caused the wireless to drop out every couple of days. They have the usual web interface but when I experimented with it, turns out they have a telnet interface. It drops you into a custom command prompt with a set of built-in commands. That's not unusual in itself, but the output was.

> ps
PID Uid VmSize Stat Command
1 admin 316 S init
2 admin SW< [ksoftirqd/0]
3 admin SW< [events/0]
4 admin SW< [khelper]
5 admin SW< [kblockd/0]
17 admin SW [pdflush]
18 admin SW [pdflush]
19 admin SW [kswapd0]
20 admin SW< [aio/0]
[etc]
>

Say, what? Busybox, is that you? Anyway, more on the ps output later. There's a surprising whole load of things that you can do even when you are in the crappy customized shell. For example, you can find out what kernel version it is running.

> cat /proc/version
Linux version 2.6.8.1 ( Compiled by michaelc) (gcc version 3.4.2) #1 Tue Apr 14 15:25:39 CST 2009
>

Linux 2.6.8.1 was released in 2004. I got this router in 2009. Dear firmware developer, what have you been doing for the last couple of years?

Back to the ps output. What makes the ps output particular interesting is not the output format per se but what it shows:

1126 admin 2404 S rvsip
1127 admin 2404 S rvsip
1128 admin 2404 S rvsip
1216 admin 988 S telnetd
1227 admin 312 S sh -c ps
1228 admin 332 R ps

It looks like they are using system(), which invokes sh -c, to call the ps command. With that in mind, I can do this:

1128 admin 2404 S rvsip
1216 admin 988 S telnetd
1229 admin 324 S sh -c ps `cat /proc/version`
1232 admin 332 R ps Linux version 2.6.8.1 ( Compiled by michaelc) (gcc

See? I just got the shell to run another command for me outside of the customized shell. That's not so interesting, but you can do useful things based on this. For example, the customized shell does not come with a ls command, but it does come with an echo command. So I can do this:

> echo /bin/*
/bin/adsl /bin/adslctl /bin/atm /bin/atmctl /bin/autoprovisionlan /bin/brctl /bin/busybox /bin/cat /bin/cfesetup /bin/cfm /bin/chmod /bin/date /bin/ddnsd /bin/df /bin/dhcpc /bin/dhcpd /bin/dhcpr /bin/dmesg /bin/dproxy /bin/dumpmem /bin/ebtables /bin/echo /bin/epi_ttcp /bin/ethctl /bin/false /bin/hotplug /bin/ifstat /bin/igmp /bin/ip /bin/iptables /bin/kill /bin/ln /bin/mkdir /bin/mount /bin/mpd /bin/msh /bin/nas /bin/nas4not /bin/netctl /bin/nstat /bin/ping /bin/pppd /bin/ps /bin/pvc2684ctl /bin/pvc2684d /bin/pwd /bin/rm /bin/rtacct /bin/rtstat /bin/rvsip /bin/sendarp /bin/setmem /bin/sh /bin/sntp /bin/ss /bin/sysinfo /bin/tc /bin/tftpd /bin/true /bin/udhcpd /bin/upnp /bin/voicectl /bin/wl /bin/wlctl
>

OK, this is really annoying. I want a shell.

> echo `/bin/sh`
(no output)

That was disappointing. However, from the output listed earlier we know sh -c is used to invoke busybox commands from the custom shell. The -c argument takes a line of arbitary shell commands, all you have to do is separate it with a semicolon! So, in theory, I should be able to run the /bin/sh command (or any arbitrary command) if I tacked on the command I wanted to run at the end.

> echo; exec /bin/sh
echo; exec /bin/sh: not found
>

OK, that didn't work. But what if I separated the echo command and the semi-colon with a space?

> echo ; exec /bin/sh

BusyBox v1.00 (2009.04.14-07:30+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.

#

Aha! Success!

# help

Built-in commands:
-------------------
. : break cd continue eval exec exit export help login newgrp
read readonly set shift times trap umask wait [ busybox cat chmod
date df dmesg echo expr false ifconfig init insmod kill klogd
linuxrc ln logger logread mkdir mount msh ping ps pwd reboot
rm rmmod route sendarp sh sysinfo syslogd test tftp tftpd top
true tty vconfig

#

Next time, do yourself a favor and get a piece of hardware on which you can install custom software, it may require a bit more initial setup but is more likely to work and will almost not be shoddily cobbled together like mine.

RSS feed