小编Art*_*ent的帖子

解释Linux提交消息,修补/保护POP SS后跟#BP中断(INT3)

这是在参考CVE-2018-8897(其似乎与CVE-2018至1087年如下)中,所描述:

英特尔64和IA-32架构软件开发人员手册(SDM)的系统编程指南中的一些声明在部分或全部操作系统内核的开发中处理不当,导致MOV SS延迟的#DB异常出现意外行为或者POP SS,正如(例如)Windows,macOS,某些Xen配置或FreeBSD中的权限提升或Linux内核崩溃所证明的那样.MOV到SS和POP SS指令禁止中断(包括NMI),数据断点和单步陷阱异常,直到指令边界跟随下一条指令(SDM第3A卷;第6.8.3节).(禁止的数据断点是MOV到SS或POP到SS指令本身访问的存储器.)请注意,中断使能(EFLAGS.IF)系统标志不会禁止调试异常(SDM第3A卷;第2.3节) .如果MOV到SS或POP到SS指令之后的指令是SYSCALL,SYSENTER,INT 3等指令,它们在CPL <3时将控制权转移到操作系统,则在转移到CPL <3之后交付调试例外完成了.操作系统内核可能不期望这种事件顺序,因此可能会在发生事件时遇到意外行为.

在阅读与Linux内核相关的git提交时,我注意到提交消息指出:

x86/entry/64:不要将#ST条目用于#BP堆栈

#BP/int3没什么值得的.我们不允许kprobes在内核中少数几个在CPL0上运行且堆栈无效的地方,并且32位内核永远使用#BP的正常中断门.

此外,在内核模式下,我们不允许在具有usergs的地方使用kprobes,因此"偏执"也是不必要的.

鉴于漏洞,我试图理解提交消息中的最后一句/段落.据我所知,IST条目是指中断堆栈表中可用于处理中断的(据称)"已知良好"堆栈指针之一.我也理解#BP是指一个断点异常(相当于INT3),并且kprobes是声称只在内核中的一些地方以ring 0(CPL0)特权级别运行的调试机制.

但是我在下一部分完全迷失了,这可能是因为"usergs"是一个错字而我只是错过了预期的内容:

此外,在内核模式下,我们不允许在具有usergs的地方使用kprobes,因此"偏执"也是不必要的.

这句话是什么意思?

linux security x86 linux-kernel

5
推荐指数
1
解决办法
161
查看次数

查询桌面搜索时如何使用win32com处理溢出?

我正在使用 Python + ADO 查询 Windows 桌面搜索 JET (ESE) 数据库。它有效,但在 ~7600 条记录后,我在使用MoveNext. 我知道它不在 EOF,因为我可以在 VBScript 中运行相同的查询并使用相同的查询获得更多的记录。

异常回溯

Traceback (most recent call last):
  File "test_desktop_search.py", line 60, in <module>
    record_set.MoveNext()
  File "<COMObject ADODB.Recordset>", line 2, in MoveNext
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147215865), None)
Run Code Online (Sandbox Code Playgroud)

查询该错误表明它是:

  • 常量: adErrDataOverflow
  • 值: 3721 -2146824567 0x800A0E89
  • 说明:数据值太大,无法由字段数据类型表示。

这在 VBScript 中运行良好(但可能只是由于错误处理不佳)。PowerShell 有以下错误(在比 Python 走得更远之后,大约与 VBScript 获得的位置相同):

Exception from HRESULT: 0x80041607
At C:\Users\doday\PycharmProjects\desktop_search_test\Get-DesktopSearchData.ps1:43 char:5
+     $recordSet.MoveNext();
+     ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo …
Run Code Online (Sandbox Code Playgroud)

python com desktop-search ado win32com

5
推荐指数
1
解决办法
598
查看次数

如何对包含带有字符串的自定义对象向量的类正确地应用5(或零?)规则

我在围绕所有权问题以及通过移动最大化性能方面遇到麻烦。想象一下这套模拟Excel工作簿的类的假设。

namespace Excel {

class Cell
{
public:
  // ctors
  Cell() = default;
  Cell(std::string val) : m_val(val) {};
  // because I have a custom constructor, I assume I need to also
  // define copy constructors, move constructors, and a destructor.
  // If I don't my understanding is that the private string member 
  // will always be copied instead of moved when Cell is replicated 
  // (due to expansion of any vector in which it is stored)? Or will 
  // it …
Run Code Online (Sandbox Code Playgroud)

c++ move c++11 rule-of-zero

1
推荐指数
1
解决办法
60
查看次数

React Native 在设备上运行 iOS 崩溃

我正在尝试在我的 iPhone 6 上运行我的本机应用程序,但是当它进入调试阶段时它崩溃了,但是在模拟器上运行它没有问题。

我的本机版本是 0.60.5

这些是我的依赖项:

"dependencies": {<br>
    "@react-native-community/netinfo": "^4.1.5",<br>
    "jwt-decode": "^2.2.0",<br>
    "react": "16.8.6",<br>
    "react-native": "^0.60.5",<br>
    "react-native-auth0": "^1.5.0",<br>
    "react-native-calendars": "^1.210.0",<br>
    "react-native-device-info": "^2.3.2",<br>
    "react-native-document-picker": "git://github.com/Elyx0/react-native-document-picker.git#v3",<br>
    "react-native-file-viewer": "^2.0.0",<br>
    "react-native-fs": "^2.14.1",<br>
    "react-native-gesture-handler": "^1.4.1",<br>
    "react-native-image-picker": "^1.0.2",<br>
    "react-native-offline": "^5.0.0",<br>
    "react-native-progress": "^3.6.0",<br>
    "react-native-queue": "^1.2.1",<br>
    "react-native-splash-screen": "^3.2.0",<br>
    "react-native-svg": "^9.6.4",<br>
    "react-navigation": "^3.11.1",<br>
    "react-redux": "^7.1.0",<br>
    "realm": "^2.29.2",<br>
    "redux": "^4.0.4"<br>
  },<br>
  "devDependencies": {<br>
    "@babel/core": "^7.5.5",<br>
    "@babel/runtime": "^7.5.5",<br>
    "@react-native-community/eslint-config": "^0.0.5",<br>
    "babel-jest": "^24.9.0",<br>
    "eslint": "^6.2.0",<br>
    "jest": "^24.9.0",<br>
    "metro-react-native-babel-preset": "^0.56.0",<br>
    "react-test-renderer": "16.8.6"<br>
  },<br>
Run Code Online (Sandbox Code Playgroud)

这是完整的日志:

2019-08-26 17:02:18.721172+0200 iDiary[14898:1856748] [Accessibility] ****************** Loading GAX Client …
Run Code Online (Sandbox Code Playgroud)

iphone xcode device ios react-native

1
推荐指数
1
解决办法
4275
查看次数