FB_security 板


On Fri, May 23, 2014 at 08:35:25PM -0400, Shawn Webb wrote: > On May 23, 2014 07:53 PM +0000, Wojciech A. Koszek wrote: > > On Wed, May 14, 2014 at 09:58:52AM -0400, Shawn Webb wrote: > > > Hey All, > > > > > > [NOTE: crossposting between freebsd-current@, freebsd-security@, and > > > freebsd-stable@. Please forgive me if crossposting is frowned upon.] > > > > > > Address Space Layout Randomization, or ASLR for short, is an exploit > > > mitigation technology. It helps secure applications against low-level > > > exploits. A popular secure implementation is known as PaX ASLR, which is > > > a third-party patch for Linux. Our implementation is based off of PaX's. > > > > > > Oliver Pinter, Danilo Egea, and I have been working hard to bring more > > > features and robust stability to our ASLR patches. We've done extensive > > > testing on amd64. We'd like to get as many people testing these patches. > > > Given the nature of them, we'd also like as many eyeballs reviewing the > > > code as well. > > > > > > I have a Raspberry Pi and have noticed a few bugs. On ARM (at least, on > > > the RPI), when a parent forks a child, and the child gracefully exits, > > > the parent segfaults with the pc register pointing to 0xc0000000. That > > > address is always the same, no matter the application. If anyone knows > > > the ARM architecture well, and how FreeBSD ties into it, I'd like a > > > little guidance. > > > > > > I also have a sparc64 box, but I'm having trouble getting a vanilla > > > 11-current system to be stable on it. I ought to file a few PRs. > > > > > > You can find links to the patches below. > > > > > > Patch for 11-current: > > > http://www.crysys.hu/~op/freebsd/patches/20140514091132-freebsd-current-aslr-segvguard-SNAPSHOT.diff > > > > > > Patch for 10-stable: > > > http://www.crysys.hu/~op/freebsd/patches/20140514091132-freebsd-stable-10-aslr-segvguard-SNAPSHOT.diff > > > > > > > Shawn > > > > I appreciate you working on this. We must have this in FreeBSD. > > > > I looked at the patch and I read, but not run it. Comments below. > > > > My personal opinion is that kern_pax.c should be compiled in by default. If > > it adds a lot of size, it'd be better to provide empty stub calls instead of > > #ifdef'ing everything. But security is very important especially in > > embeddded systems, so you can imagine you're writing the code that everybody > > wants and must have enabled for decent level of security. > > > > All modern systems run with ASLR turned on. > > > > I skipped user-space stuff. I don't think it's necessary in this commit and > > should be separated. > > > > There's a lot of lines of code for status showing. Not sure if we care that > > much: ASLR is either on or off. Not sure about more granularity. More below. > > We provide the level of granularity because there are a lot of > applications that might exhibit weird behaviors or even crash if we > randomize too many bits. We provide sane defaults, but allow each user > to choose the level of security versus the level of stability they > desire. I'm OK with it being more granular if that's the case. But Linux/MacOSX all have ASLR. If we have programs in ports/ that run on Linux, it's likely they'll just work. If they break, we'll just marked them as broken and to be fixed by the maintainer. Can you run GNOME or KDE with your patch? Or node.js? Node.js uses JIT engine for Javascript. If it works, it's quite likely other will work. > > > > kern_jail.c: > > > > something looks wrong here. Sounds like you need "pr->pax". But I don't > > understand why you need to have these pr_* values here. It seems > > unnecessary. > > I've made it possible to have per-jail ASLR settings. If you have an > application that misbehaves, you can jail it with ASLR turned off just > for that jail. My BSDCan presentation talks about this. The recording > isn't up, yet, though. I don't get it. If there's a program that is broken but you want to run it in jail, our rc.d jail startup script should earn a "NOPIE" function maybe. I believed PIE/NOPIE is per-process setting on whether to use PIE or not. In this case we'd be able to do: /usr/sbin/jail ...... /usr/sbin/nopax program ... In Linux you can do it with personalities. I don't know what it would translate in the FreeBSD to. I guess this could be achieved with simple per-process SYSCTL. "nopax" would disable ASLR, fork and exec(). > > I can imagine we won't want ASLR only temporarily, for ports which break and > > must be fixed. So we probably just need per-process ASLR on/off switch and a > > wrapper which could be used like: > > > > aslr off program .... > > So we have right now an addition to mac_bsdextended(4)/ugidfw(8) that > does this exact thing. We also plan on adding FS extended attribute > support soon, too. Also, per-jail ASLR settings. If you can already do it with MAC layer, it should be enough. Touching jail(8) will require lots of people to review this patch and analyze it in a great details, which typically slows things down a lot. > > The debug stuff I'd remove too. We could have additional CTR stubs used > > there, if necessary. > > Oliver just released a new patchset today with new debugging > functionality. I'd love to hear your commments on it. Like des@ and David said: I'd just use ktrace/audit subsystem. > > > > segvguard part I didn't understand. Why do you keep a list of programs that > > failed? There was no ASSERTs, thus it was hard to understand the locking > > too. > > We've semi-paused development of segvguard for the moment to focus on > ASLR. Though the features are related and segvguard is recommended for a > proper ASLR implementation, it is not required. Danilo Egea Gondolfo is > the principal engineer behind our segvguard implementation. We're still > working out the kinks and the underlying design and architecture of this > feature. What is it for? What does it do? I'd remove it until you get basic ASLR in the kernel. > > I'm trying to understand if randomization is done correctly. Do you think > > you could post the results? > > > > Program: > > > > http://pastebin.com/XTRHLhMg > > My results on an amd64 VM are pasted here: http://ix.io/cD5 > OK, so the comparison for stack is: MacOSX : 0xfffff000 20 random bits Linux : 0xfffffff0 28 random bits FreeBSD: 0x000ffff0 16 random bits Could we make FreeBSD be like Linux? Heap randomization also looks better on Linux. Thanks for preparing it. -- Wojciech A. Koszek [email protected] http://FreeBSD.czest.pl/~wkoszek/ _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-security To unsubscribe, send any mail to "[email protected]"







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草
伺服器連線錯誤,造成您的不便還請多多包涵!
「贊助商連結」






like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Gossiping站內搜尋

TOP