CVE-2019-14287 – sudo

Thre is a bug in sudo before 1.8.28. The bug, basically, involve UID validation where user ID -1 or 4294967295 could allow a user with sudo privilege to run command as root, even the Runas specification explicitly disallow root access.

For example,  specify Runas in /etc/sudoers like this:

test ALL=(ALL,!root) /usr/bin/whoami
You can do this:
Fix ? Just update the package.

DNS Flag Day

Background
0. อินเทอร์เน็ตอาศัยเลข IP address ในการระบุที่อยู่ของ devices ที่เชื่อมต่อกัน แต่มนุษย์จำเลข IP address พวกนี้ไม่ได้หรอก จึงเกิด Domain Name System (DNS) เพื่อให้เราใช้ชื่อเครื่อง (hostname) ที่จำได้ง่ายกว่า แทน IP address ได้ โดย DNS จะไปหา (resolve) มาให้ว่า hostname นี้ใช้ IP address อะไร

1. บริการของ DNS ทำผ่าน name servers ซึ่งมีกระจายทั่วโลก คอมพิวเตอร์ที่ต่ออินเทอร์เน็ตเกือบทั้งหมดจะได้รับการกำหนดค่า name server(s) เสมอเพื่อจะได้ถามหา IP address ของ hostname ที่ผู้ใช้จะเชื่อมต่อได้ถูก

Problems
2. มันควรเป็นปกติสุข จนระบบ DNS มีความซับซ้อนมากขึ้นเรื่อย ๆ (ตอนนี้ RFC เกี่ยวกับ DNS เป็นร้อยฉบับแล้ว) มีฟีเจอร์ใหม่เพิ่มขึ้นเรื่อย ๆ name server บางตัวก็ใช้ software ที่ทำงานได้ไม่ครบ บางตัวก็เหมือนจะครบแต่ไม่ compliance ทั้งหมด

3. เพื่อให้ทำงานได้ปกติสุข มี dev ของ software / providers ยอมทำ workaround เพื่อให้ทำงานกับ software ที่ไม่ comply ตามมาตรฐาน .. มันก็ทำงานได้ user ก็ happy แต่มันทำให้ resolve ช้ากว่าที่ควรจะเป็น และพัฒนา software ไปข้างหน้ายากขึ้นเรื่อย ๆ

4. workaround ไม่ได้เกิดครั้งสองครั้งแต่มันทับถมมาเรื่อย ๆ เป็น case by case จนถึงจุดที่แบกต่อไม่ไหว เลยตกลงว่า วันที่ 1 กุมภาพันธ์ 2562 software / providers ที่ทำ workaround ไว้ จะเอา workaround ออกหมด ใครยังไม่ comply ก็จะโดนเท เรียกว่า DNS Flag Day

DNS Flag Day
5. วันที่ 1 กุมภาพันธ์ 2562 เป็นต้นไป ถ้า hostname ของ domain ไหนไปอยู่กับ name servers ที่ไม่ comply ตาม EDNS จะมีผลกระทบถึงขั้น resolve จาก hostname เป็น IP address ไม่ได้ เสมือนกับว่า hostname นั้นหรือ domain นั้นไม่มีอยู่บนโลกนี้ เรียกง่าย ๆ ว่าเหมือนถูกตัดขาดจากอินเทอร์เน็ต

6. ผู้ดูแลระบบ DNS/name servers จำนวนหนึ่งทราบเรื่องนี้มากันตั้งแต่ปีที่แล้ว และพยายามแจ้งข่าวกันเรื่อย ๆ เพื่อช่วยกันตรวจสอบและแก้ไข name servers ในการดูแลของตัวเองให้ระบบ comply กับ EDNS ก่อนวันที่ 1 กุมภาพันธ์ 2562

7. ตรวจสอบ EDNS compliance ได้ที่ https://ednscomp.isc.org/ednscomp ถ้า All OK ก็รอด

สงกรานต์ ๒๕๖๑

สงกรานต์ปี 2561 เป็นปี จ.ศ. (2561 – 1181) = 1380

วันเถลิงศก ตรงกับ

(1380 * 0.25875)
+ floor(1380 / 100 + 0.38)
- floor(1380/ 4 + 0.5)
- floor(1380 / 400 + 0.595)
- 5.53375
= 357.075 + 14 - 345 - 4 - 5.53375
= 16.54125

= วันที่ 16 เมษายน 2561 เวลา 12:59:24

วันสงกรานต์ ตรงกับ

16.54125 - 2.165 = 14.37625

= วันที่ 14 เมษายน 2561 เวลา 09:01:48

พิธีพระราชทานปริญญาบัตร มข. พ.ศ. ๒๕๖๐

วันนี้เป็นวันพิธีพระราชทานปริญญาบัตร ของ มข.  ผู้บริหารมหาวิทยาลัยได้ขอพระราชทานพระราชานุญาตร่วมฉายพระฉายาลักษณ์กับพระองค์สามชุด

ผมอยู่ในชุดที่สาม เป็นชุดสุดท้ายก่อนที่พระองค์จะเข้าห้องรับรองพักผ่อนอิริยาบท พระองค์มีพระปฏิสันถารอยู่นาน ทรงยิ้มแย้ม หัวเราะ มีอารมณ์ขันและหยอดมุกตอบกลับอย่างไม่ถือพระองค์

ได้เห็นพระองค์ท่านมีความสุข เวลาเสด็จพระราชดำเนินมา มข.
เป็นเรื่องที่ดีที่สุดแล้ว

 

Why Google Apps / G Suite for Education is free ?

ทุกครั้งที่บอกว่า G Suite for Education ฟรี พื้นที่ไม่จำกัด และ มข. ให้ใช้งานได้ไปตลอดชีวิต จะมีคำถามเสมอว่า

“แล้ว Google เขาได้อะไร ?”

คำตอบทางการ ของ Google น่าสนใจทีเดียว

G Suite for Education is free. We plan to keep the core offering of G Suite for Education free. This offering includes user accounts for future incoming students. As you may know, Google was founded by a research project at Stanford University, and this is just one way we can give back to the educational community.

“นี่จึงเป็นอีกวิธีหนึ่งที่เราสามารถตอบแทนชุมชนการศึกษา”

สรุปคือ Google พยายามจะบอกว่า …

กูไม่ได้ทำเพื่อจะ “ได้” แต่กูทำเพื่อจะ “ให้”

Google Drive: Transfer Ownership using Team Drive

Google Drive does have a feature to transfer ownership from one user to another within the same domain. This is mainly for the case that a user leave a company, and his/her account is terminated.

However, Google does not allow to transfer ownership across the domain. People keep asking for this feature for many years, and there are workarounds – use drive sync, or use 3rd -party apps.

But, there is a by-product workaround (or solution) for this — Team Drives.

Just create a Team Drive (e.g., “transfer”), add a source account and a destination account as members, then you can move files and folders between the two accounts using the team drive.

Technically, when you move files/folders from My Drive to a Team Drive, Ownership of those files/folders will be changed from the source to the Team Drive. And, when you move files/folders from a Team Drive to My Drive, Google will change ownership from the Team Drive to the destination account.

For files, you can move from/to a Team Drive freely. But, for folders, you need your GSuite admin to set “Move any files and folder to Team Drive” privilege for you.

Note: the moving process from/to a Team Drive is NOT instantaneous – it takes time. So, if you move a large number of files and folders to/from a Team Drive at once, you should WAIT.

Upgrading Graylog from 2.2 to 2.3

Well, my installation is based on the official deb package.  However, you cannot automatically upgrade from 2.2 to 2.3. I think this is because graylog might change things overtime and they don’t want to break things without administrator’s supervision.

So you need to download and dpkg -i to install it manually.

You should also check upgrading to 2.3.x docs where they describe changes that may impact your configuration.

For my case, I decide to upgrade and replace my existing graylog.conf with the maintainer’s configuration. Then, copy password hashes from the existing one to the new one.

It runs smoothly though.